Base solution for your next web application
Open Closed

Workflow in Version 15.5 #12702


User avatar
0
WirelessDynamics created

Does workflow in version 15.5 support business entity process, can we link it to our own database

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

7 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @WirelessDynamics

    Yes, the Workflow & Approval Builder feature has been released in version 15.5. You can find instructions on how to install it in this document.

    If you need further information, please feel free to contact us.

    Thank you.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    WirelessDynamics created

    yes, I viewed it, but the question is different. My Question is that: could we use the workflow in integration with our current entity and entities built by power tools

    for examples we have an application for Asset transfer from location to location ,and we need to apply Workflow on this process,is that possibke and how?

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @WirelessDynamics,

    Yes, this is possible. Workflow can work with your existing entities and with entities generated by Power Tools, and you don't need to change those entities. The workflow handles the approval process, and your entity keeps holding the business data. They're connected at three points: when the process starts, while it runs, and when it ends.

    Here is how that would look for asset transfer.

    1. Designing the process

    First you create an "Asset Transfer" workflow in the workflow designer. This part is visual and needs no coding. You define:

    • the information the process carries: the asset, the source location and the destination location
    • the approval steps, for example "source location manager approves, then destination location manager approves"
    • who approves each step: a specific user, a role or an organization unit
    • any rules, for example "if the asset's value is above a limit, Finance must also approve"

    Once you publish it, the workflow is ready to use.

    1. Starting the workflow from your transfer screen

    Your users keep creating transfers on your own Asset Transfer page, the one generated by Power Tools. When a transfer is saved, your application starts the workflow for it and passes the transfer's details along.

    Each workflow instance is given a reference to your record, such as "Asset Transfer #42". That reference keeps the two linked. From a transfer you can find its workflow and show its approval status on your page. From a workflow you can find the transfer it belongs to.

    1. Running the approvals

    From here the workflow takes over. Approvers see their pending tasks in their workflow inbox and approve or reject them. The module also handles notifications, comments, history, deadlines and delegation. Your entity doesn't need to do anything during this stage.

    1. Updating your entity when the process ends

    When the workflow finishes, the module raises an event that says whether the request was approved, rejected or cancelled. Your application listens for it, uses the reference to find the matching transfer, and updates it. If approved, it marks the transfer as completed and moves the asset to the new location. If rejected, it marks the transfer as rejected.

    Optional possibilities

    Your own steps in the designer. You can add custom actions, such as "Move asset to new location". Process designers can then place that step anywhere in the flow, so your business logic runs at the right moment.

    Waiting for something in your application. The workflow can pause until something happens on your side, for example the asset arriving at the destination. When your application records the delivery, the workflow continues.

    A note about Power Tools

    Power Tools overwrites the files it generates each time you regenerate an entity. We recommend keeping the workflow integration in your own separate classes and calling them from the generated code. That way, regenerating the entity won't remove your workflow logic.

    If you share the steps of your transfer process (who approves, in what order, and what should happen afterwards), we can help you map it to a workflow.

    Best regards

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    WirelessDynamics created

    It is not yet clear to us how to link the workflow to the asset transfer entity. At which step do we do this link?

    We understand that we can add a custom action in our processor designer to implement the business logic, but at which step can we link the workflow with the asset transfer process entities

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @WirelessDynamics

    You make the link when the workflow is started. Your application's code does it. It isn't done in the designer.

    The designer defines one process that every transfer follows, so it can't point to a particular transfer. The link belongs to each record, so it is made when a specific transfer starts its own workflow.

    Here is the full sequence.

    1. The user saves a transfer The user creates a transfer on your Asset Transfer page, as they do today. When it is saved, the transfer gets its ID, for example 42.

    2. Your code starts the workflow and links it to that transfer

    Right after the transfer is saved, in the same create operation in your Asset Transfer service, your code starts the workflow. When it starts the workflow, it gives the module two things:

    A reference to the transfer, such as "AssetTransfer:42". The workflow instance stores this permanently as its business key. This is the link. The transfer's details (transfer ID, asset, source location, destination location), filled into the workflow's form fields. Approvers then see this information, and the workflow can use it in its rules.

    1. Optional: store the link on your entity as well

    Starting the workflow returns the ID of the new workflow instance. We recommend adding a "Workflow Instance Id" field to your Asset Transfer entity with Power Tools and saving that ID there. Then the link works in both directions:

    • the workflow knows its transfer (through the reference)
    • the transfer knows its workflow (through this field), so your transfer page can show the approval status
    1. From then on, every part of the workflow can find the transfer
    • Your custom action, for example "Move asset to new location": when it runs, it knows which workflow instance it belongs to. It reads the reference "AssetTransfer:42" and loads transfer 42 from your database. You can also do this in the designer: connect the action's input to the "Transfer ID" form field, and the action receives the ID directly.
    • The end of the process: when the workflow is approved, rejected or cancelled, your application receives an event. It uses the same reference to find the transfer and update its status.

    One recommendation

    Start the workflow from your Asset Transfer screen, not from the general workflow request page. Starting from the transfer screen is what creates the link automatically. The general request page doesn't know about your transfers.

    Best regards,

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    WirelessDynamics created

    Dear All,

    Can we have a sample code for the below:

    1- How to start the workflow from My Service. 2- How to map my asset source and destination location to the field in t he workflow 3- How to trigger a custom action from the workflow in my Asset Transfer service. 4- can we check if the workflow is enabled or disabled?

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @WirelessDynamics

    A detailed explanation and sample code have been tested and written for you in the Markdown file below. Please feel free to contact us if you have any questions.

    Markdown Files Link Please request access to the file.

    Thank you.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)