Called by

Not exactly best practice, but still a helpful way to make code dependent of the calling class.
The specific calling method can also be identified: “ClassName\\methodName”

boolean calledBy(str _caller)
{
    container       stack = xSession::xppCallStack();
    int             i;
    for(i=3;i<=conLen(Stack);i+=2)
    {
         if(strScan(conPeek(stack,i),_caller,1,9999))
             return true;
    }
    return false;
}
Advertisements

Debug workflow processing

The following simple job allows you to use breakpoints in workflow handler classes.

/// Process workflow outside of batch job (for debugging purposes)
/// Note: run multiple times for one single workflow 
static void processWorkflowQueue(Args _args)
{
    SysWorkflowMessageQueueManager::runStatic(conNull());
}