Skip to main content
Question

Extract open child task id based on parent ticket id in ETM

  • November 3, 2022
  • 1 reply
  • 78 views

Forum|alt.badge.img+5
  • Do Gooder (Customer)
  • 11 replies

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.

1 reply

Forum|alt.badge.img+10

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings