workItem is not accessable in check method of ECMA script | Community
Skip to main content
October 16, 2015
Solved

workItem is not accessable in check method of ECMA script

  • October 16, 2015
  • 2 replies
  • 1403 views

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.
Best answer by Sham_HC

Issue (CQ5-11022) has been filled.

2 replies

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

Issue (CQ5-11022) has been filled.

smacdonald2008
Level 10
October 16, 2015
What is the result that you are seeing. Is null being returned?