Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

How to get workitem object ref in ECMA check method?

sureshy2015
Level 4
Level 4

How to get workitem object ref in ECMA check method?.pls help me on the same.

1 Accepted Solution
edubey
Correct answer by
Level 10
Level 10
// querying work items
var workItems = wfSession.getActiveWorkItems();
var workItem = wfSession.getWorkItem(id);
 
// getting routes
var routes = wfSession.getRoutes(workItem);
 
// delegating
var delegatees = wfSession.getDelegatees(workItem);
wfSession.delegateWorkItem(workItem, delegatees.get(0));
 
// completing or advancing to the next step
wfSession.complete(workItem, routes.get(0));

 

Reference

View solution in original post

1 Reply
edubey
Correct answer by
Level 10
Level 10
// querying work items
var workItems = wfSession.getActiveWorkItems();
var workItem = wfSession.getWorkItem(id);
 
// getting routes
var routes = wfSession.getRoutes(workItem);
 
// delegating
var delegatees = wfSession.getDelegatees(workItem);
wfSession.delegateWorkItem(workItem, delegatees.get(0));
 
// completing or advancing to the next step
wfSession.complete(workItem, routes.get(0));

 

Reference

View solution in original post