Example #1
0
        protected override void Execute(CodeActivityContext context)
        {
            var executorRuntime = context.GetExtension <IExecutorRuntime>();
            var jobInfo         = executorRuntime.RunningJobInformation;

            string currentProcess = jobInfo.ProcessName.ToString();

            if (currentProcess.Contains("_"))
            {
                currentProcess = currentProcess.Split('_')[0];
            }

            JobId.Set(context, jobInfo.JobId.ToString());
            ProcessName.Set(context, currentProcess);
            ProcessVersion.Set(context, jobInfo.ProcessVersion.ToString());
            WorkflowFilePath.Set(context, jobInfo.WorkflowFilePath.ToString());
        }