Expand my Community achievements bar.

SOLVED

workItem is not accessable in check method of ECMA script

Avatar

Former Community Member

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?