public boolean canSubmitToWorkflow(str _workflowType = '')
{
boolean ret;
ret = this.RecId != 0 && this.S3WorkflowApprovalStatus == S3WorkflowApprovalStatus::NotSubmitted;
return ret;
}
****************************************************************
void submit(Args args)
{
recId recId = args.record().RecId;
WorkflowCorrelationId workflowCorrelationId;
WorkflowTypeName workflowTypeName =workflowtypestr(S3SPLManpowerRequisi);
WorkflowComment note ="";
WorkflowSubmitDialog workflowSubmitDialog;
SPLManpowerRequisition SPLManpowerRequisition;
workflowSubmitDialog = WorkflowSubmitDialog::construct(args.caller().getActiveWorkflowConfiguration());
workflowSubmitDialog.run();
if (workflowSubmitDialog.parmIsClosedOK())
{
recId = args.record().RecId;
SPLManpowerRequisition = args.record();
// Get comments from the submit to workflow dialog.
note = workflowSubmitDialog.parmWorkflowComment();
try
{
ttsbegin;
workflowCorrelationId = Workflow::activateFromWorkflowType(workflowTypeName,recId,note,NoYes::No);
SPLManpowerRequisition.S3WorkflowApprovalStatus = S3WorkflowApprovalStatus::Submitted;
SPLManpowerRequisition.update();
// Send an Infolog message.
info("@SPL5159");
ttscommit;
}
catch(exception::Error)
{
info("@SYS303438");
}
}
args.caller().updateWorkFlowControls();
}
{
boolean ret;
ret = this.RecId != 0 && this.S3WorkflowApprovalStatus == S3WorkflowApprovalStatus::NotSubmitted;
return ret;
}
****************************************************************
void submit(Args args)
{
recId recId = args.record().RecId;
WorkflowCorrelationId workflowCorrelationId;
WorkflowTypeName workflowTypeName =workflowtypestr(S3SPLManpowerRequisi);
WorkflowComment note ="";
WorkflowSubmitDialog workflowSubmitDialog;
SPLManpowerRequisition SPLManpowerRequisition;
workflowSubmitDialog = WorkflowSubmitDialog::construct(args.caller().getActiveWorkflowConfiguration());
workflowSubmitDialog.run();
if (workflowSubmitDialog.parmIsClosedOK())
{
recId = args.record().RecId;
SPLManpowerRequisition = args.record();
// Get comments from the submit to workflow dialog.
note = workflowSubmitDialog.parmWorkflowComment();
try
{
ttsbegin;
workflowCorrelationId = Workflow::activateFromWorkflowType(workflowTypeName,recId,note,NoYes::No);
SPLManpowerRequisition.S3WorkflowApprovalStatus = S3WorkflowApprovalStatus::Submitted;
SPLManpowerRequisition.update();
// Send an Infolog message.
info("@SPL5159");
ttscommit;
}
catch(exception::Error)
{
info("@SYS303438");
}
}
args.caller().updateWorkFlowControls();
}
**************************************************************
public static void main(Args args)
{
S3SPLManpowerRequisiSubmitManager S3SPLManpowerRequisiSubmitManager = new S3SPLManpowerRequisiSubmitManager();
;
S3SPLManpowerRequisiSubmitManager.submit(args);
}
No comments:
Post a Comment