public static string WorkflowActionToText(this WorkflowAction wfa) { switch (wfa) { case WorkflowAction.ForwardApproval: return("Forward Approval"); case WorkflowAction.ForwardProcess: return("Forward Processing"); case WorkflowAction.FinishProcess: return("Finish Process"); case WorkflowAction.ContinueProcess: return("Continue Process"); default: return(wfa.ToString()); } }
public IRestResponse Post(string name, string insideCode, string objectId, TriggerDataAction triggerDataAction, WorkflowAction workflowAction) { string code = "/* globals\n" + "$http - Service for AJAX calls \n" + "CONSTS - CONSTS.apiUrl for Backands API URL\n" + "Config - Global Configuration\n" + "*/\n" + "'use strict';\n" + "function backandCallback(userInput, dbRow, parameters, userProfile) {\n" + " \n" + insideCode + "}"; code = code.Replace("+", "%2B"); return(base.Post(new ActionData() { name = name, code = code, useSqlParser = false, viewTable = objectId, workflowAction = workflowAction.ToString(), dataAction = triggerDataAction.ToString(), additionalView = "", databaseViewName = "", inputParameters = "", whereCondition = "true" })); }