Skip to main content

I have a business  case where ETM channel will receive a inbound email with Parent ticket no and I need to close the last open task of that ticket so it moved to the next stage of the workflow.

Just wondering if ETM data mapper can extract the last child open task number if I pass parent ticket id as parameter.

You can retrieve the parent event, along with it’s process, stages and tasks via a Variable assyst Search field. To get the tasks when retrieving the event set the ‘fields’ attribute to ‘process.stages.tasks.taskEvent’

You can then use an expression to calculate the event Id to use for the close action that you need to take to progress the workflow. 

The expression will need to walk the process tree to find the active stage, and within that the relevant task.

Something (untested) like:

var activeStage = variables.parentEvent.process.stages.fillter(function(s){return s.stageStateEnum == 'ACTIVE'})=0];

Will find the active stage, and something similar can be used to find the task within the active stage.

 


Reply