Regarding Moqui Workflow Engine by Netvariant

Hello Moqui Community,
I am using the Workflow Designer and Moqui Workflow developed by Netvariant for designing and implementing workflows in my project. Here are the GitHub links for these projects:

  • Moqui Workflow by Netvariant
  • Workflow Designer by Netvariant

I have successfully designed my workflow and created a workflow instance. However, I have a doubt regarding the behavior of the Moqui Workflow engine by Netvariant. In my workflow, there is a ‘Review’ task. If the status of this task is not updated in the entity, will the workflow engine wait until that status is updated before moving on to the next task?

In other words, if the ‘Review’ task is not complete, will the workflow instance not move on to the ‘Approve’ task? Once I update the ‘Review’ status in the entity, will the workflow engine then check the conditions again and proceed to the next task if the conditions are met?

Also, does the Moqui Workflow engine by Netvariant constantly check the status (polling), or is it event-driven and only checks the status when notified of a change?

Any guidance or clarification on this would be greatly appreciated.

Thank you in advance for your help!

Hi Mathan,

The workflow engine hasn’t been updated in a while. I’m planning on releasing a new version in the near future that is better architected and is more closely integrated with OOTB Moqui entities.

The current implementation of the workflow engine under Netvariant comes with a service job called start_ElapsedWorkflowInstances_frequent which checks for any activities that have timed out, i.e. a task that didn’t get a response with the allocated time.

2 Likes

Hello aabiabdallah,

Thank you for your detailed response. It’s helpful to know about the start_ElapsedWorkflowInstances_frequent service job and how it handles tasks that have timed out. This gives me a better understanding of how the workflow engine operates.

I’m also excited to hear about the upcoming version of the workflow engine that will be better architected and more closely integrated with OOTB Moqui entities. I’ll definitely keep an eye out for updates on this.

Could you please let me know when the new version is expected to be released? Or is there a way I can be notified when it becomes available?

Thanks again for your help! :slightly_smiling_face:

I’ll post a message on this forum once the new component is officially released.

3 Likes

:sparkles: :eyes: Let’s go :sparkles:

2 Likes

Passing Service Parameters in Moqui Standalone Workflow Screen

I’m designing a standalone workflow screen where I need to pass parameters to services. However, I’m facing challenges with correctly passing and accessing these parameters.

Here’s what I’ve tried so far:

  • I’ve dragged and dropped services onto the canvas in the Workflow Designer.
  • I’ve set up the parameters in the “Parameters” input box for each service.

However, when I run the workflow, the parameters don’t seem to be correctly passed to my services. For example, the productId parameter is coming up as null.

Could someone guide me on the correct approach to pass and use service parameters in a standalone workflow screen? Any insights or examples would be greatly appreciated!

Thank you in advance!

How are you setting up the parameters for the service activity?

1 Like

Thank you for your response! I appreciate your willingness to help.

Regarding setting up parameters for the service activity, here’s what I’ve done so far:

  1. In the Workflow Designer, I’ve dragged and dropped services onto the canvas.
  2. For each service, I’ve entered the parameters in the “Parameters” input box. For example:
    • productId=123
    • userId=ec.user.userAccount.userId
    • userName=John Doe

However, when I run the workflow, the parameters don’t seem to be correctly passed to my services. The productId parameter is showing up as null.

Could you please guide me on the correct approach to pass and use service parameters in a standalone workflow screen? Any insights or examples would be greatly appreciated!

Thank you once again for your assistance.

The workflow service activity expects a service that has these input parameters:

  • instance (WorkflowInstance EntityValue)
  • parameters (JSON string)

Your service would then parse the JSON string to fetch the parameters you need. More details here:

https://github.com/netvariant/moqui-workflow/blob/master/src/main/java/org/moqui/workflow/activity/WorkflowServiceActivity.java#L72

1 Like