Task Inbox filter in Workflow

0
Hi Team , I am working on a Mendix application where I have used workflows .  I am creating a request and than request go for manager approval and then end .  Manager saw his request on task inbox page as shown below . As you can see I have passed the workflow context/Approver and workflowcontext/BudgetStatus from task action activity in workflow .( I set task name as workflow context/approver and task definition as workflow context/Budget . So I got two fields from the main request entity here and I can filter based on those attributes .    Now our client want to add more files from ITLeadInput entity here on task inbox page . But I cannot pass any more objects as task action ( display information) section we can only pass 2 things at max ( task name , and task definition ). Do we have any way so I can add more attributes from workflow context here in the task inbox overview page ? (Like : HayLevel, Job title , Client Unit ) . So manager can filter directly and open only relevant request .        
asked
4 answers
0

if you are using DataGrid2, you should be able to walk the relationship from the Task entity to the Workflow entity and then to the Context entity.

 

System.WorkflowUserTask_Workflow/MyModule.WorkflowEntity/MyModule.WorkflowEntity_WorkflowContextEntity/MyModule.WorkflowContextEntity/MyModule.WorkflowContextEntity.MyAttribute

 

I hope this helps

answered
0

 yw oN

answered
0

hello Shivam – have you found solution for this yet ?

answered
0

Hi Shivam,

 

I encountered the same issue in our Mendix app. Filtering on fields from the WorkflowContext seemed impossible when showing the WorkflowUserTask in a datagrid.

 

Our solution was to make a many to one association from the WorkflowContext to the Workflow object starting from the WorkflowContext. When the Workflow is called we use the output variable from the ‘Call Workflow’ action in a microflow to make the association between the WorkflowContext and the Workflow.

 

In our datagrids we show the WorkflowContext objects filtered by the following XPath:

[WorkflowContextObject_Workflow/System.Workflow/System.WorkflowUserTask_Workflow/System.WorkflowUserTask/System.WorkflowUserTask_TargetUsers = '[%CurrentUser%]']
[WorkflowContextObject_Workflow/System.Workflow/System.WorkflowUserTask_Workflow/System.WorkflowUserTask/State = 'InProgress']

Where the WorkflowContextObject is your own Context.

 

To show the user task we use a microflow that retrieves the Workflow object from our WorkflowContext and a retrieve WorkflowUserTask that constrains with the following XPath:

[System.WorkflowUserTask_Workflow = $Workflow]
[System.WorkflowUserTask_TargetUsers = $currentUser]
[State = 'InProgress']

 

If a UserTask is retrieved we assign it to the current user and show the UserTask page with the ‘Show User Task Page’ action.

 

Good luck!

answered