Does anyone know if it is possible to detect in a process whether it has been executed from an atom schedule or from Atmosphere Test button on the process build canvas?
There is an Atomsphere API object readily available Execution Recordobject
You can perform QUERY action against it.
<ExecutionRecord> <executionId></executionId> <account></account> <executionTime></executionTime> <status></status> <executionType></executionType> <processName></processName> <processId></processId> <atomName></atomName> <atomId></atomId> <inboundDocumentCount></inboundDocumentCount> <outboundDocumentCount></outboundDocumentCount> <executionDuration></executionDuration> <inboundDocumentSize></inboundDocumentSize> <outboundDocumentSize></outboundDocumentSize></ExecutionRecord>
You have tag
which indicates how the process execution was initiated. Possible values are:
EXEC_LISTENER (execution initiated by a listener request)
EXEC_MANUAL (manual execution)
EXEC_SCHED (scheduled execution)
RETRY_MANUAL (manual retry)
RETRY_SCHED (scheduled retry)
SUB_PROCESS (subprocess call)
TEST_MANUAL (test mode execution)
Hope this answers your question.
That looks ideal except it doesn't appear to be available from within the process itself i.e the execution record is only inserted post process completion. Ideally, I would like to find out the execution type at the start of the process so that I can use it in logic steps later on especially when a process is executed by clicking this button:
Thanks for your help,
I had a similar requirement for me before.
But there was no any class that can give me that information on the fly...
Submit an idea for this feature.
The most common solution is to set a process property and extend it...Can contain values like "TEST" and "PROD"
See also/vote for Ability to access runtime "system" properties via UI/parameters list
Retrieving data ...