Expand my Community achievements bar.

SOLVED

how to fetch workflow launcher configurations in custom WorkflowProcess execute method?

Avatar

Level 5

I have created a new workflow using public class MyProcess implements WorkflowProcess { }

i have overridden 

public void execute(WorkItem item, WorkflowSession session, MetaDataMap args) throws WorkflowException { }

this method and able to get payload when an asset gets uploaded.

However I want to access the workflow launcher configurations(i.e. the folder of DAM assets on which the workflow gets launched) in my java code.

how do i get it , I am not saying about arguments, arguments can be fetched by MetaDataMap args.

can anyone tell me , if possible a couple of lines demonstrating same woul help a lot.

Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

Not sure exactly what you're hoping for but in later releases of worklfow you can find out which launcher started a workflow, if it was started by a launcher.  

it is stored in the worklfow metadata with the key "launcherId".

Hope this helps,

Will

View solution in original post

2 Replies

Avatar

Correct answer by
Employee

Hi,

Not sure exactly what you're hoping for but in later releases of worklfow you can find out which launcher started a workflow, if it was started by a launcher.  

it is stored in the worklfow metadata with the key "launcherId".

Hope this helps,

Will

Avatar

Level 10

Looking through the workflow Javadocs - i am not seeing an API that returns this information:

http://docs.adobe.com/docs/en/cq/5-6-1/javadoc/com/adobe/granite/workflow/exec/package-summary.html

Looks like its not supported via the Workflow API. 

You may have to get this information using the JCR API - that is -reading the node props. 

I will check with Will