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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

workItem is not accessable in check method of ECMA script

Avatar

Level 3

Hi,

I am trying to access workflow instance node for checking some property (this is being set in previous step). I tried using workItem for getting workflow instance node inside check()

var path = workItem.getWorkflow.getId(); // workItem is not available --- tried graniteWorkItem as well

Node wfNode = workflowSession.getSession().getItem(path);

//Then I can do hasProperty on that node. But workItem is not accessible?

Is there any other way where I can get the instance node path?

This is output  path I am expecting - "/etc/workflow/instances/2013-12-02/model_1385973603042334000"

1 Accepted Solution

Avatar

Correct answer by
Level 10

Issue (CQ5-11022) has been filled.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Issue (CQ5-11022) has been filled.

Avatar

Level 10
What is the result that you are seeing. Is null being returned?