Create a workflow and open task directly without need to going into task inbox.

0
Can we create and open a workflow task directly? User should have the task open directly instead of going to the task inbox and then opening from there. Also, other users in the same group should be able to view the task under 'All Open Tasks'. That means task visibility should be to the entire user role, but the user who is creating the task should be landed to the user task page directly.
asked
3 answers
0

Any Solution?

answered
0

We did build an app in which an user could complete a workflow task and open-up another, newly created/follow-up task directly if he was allowed to do so.

In order to get this to work we first used the Complete Task action for the current task of course.

Then we ended the current transaction, added a delay of 1000ms and started a new transaction after the wait. These actions can all be done by utilizing the java action from the CommunityCommons module.

After this, we retrieved the WorkflowUserTask from db, where in the Xpath we put in the following constraints:

[System.WorkflowUserTask_Workflow = $Workflow]
[id != $WorkflowUserTask_Current]
[State != 'Completed']

Then, if found, just use the 'Show user task page' action.

 

Note that, because of the needed delay, the user needed to wait approximately 1 second as well. We made the delay configurable in a constant so that, if needed, it could be scaled up & down based on what was needed for the specific app environment.

answered
0

An alternative we are using:

 

You create an association between your entity and system.Workflow (* to 1), When you start your workflow you set the association in your entity.

Now you are able to retrieve the workflow, next you retrieve the list of workflowuser tasks from the workflow and from this list the head.

That should give you the current active WorkflowUserTask.

 

Now you have the needed WorkflowUserTask page parameter for the UserTask page.

answered