Skip to main content
Oct 16, 2015 2:28 AM UTC
Solved

workItem is not accessable in check method of ECMA script

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"

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Sham_HC
Sham_HCAccepted solution
Level 10
Oct 16, 2015 2:28 AM UTC

Issue (CQ5-11022) has been filled.

2 replies

smacdonald2008
Level 10
Oct 16, 2015 2:28 AM UTC
What is the result that you are seeing. Is null being returned?       
Translate
Sham_HC
Sham_HCAccepted solution
Level 10
Oct 16, 2015 2:28 AM UTC

Issue (CQ5-11022) has been filled.

Translate