Skip to content

Commit

Permalink
Update WorkFlowExamples.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
v1r3n committed Jan 31, 2024
1 parent 1354768 commit a586773
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions csharp-examples/WorkFlowExamples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@ public class WorkFlowExamples
private const string KEY_SECRET = "<REPLACE_WITH_KEY_SECRET>";
private const string OWNER_EMAIL = "<REPLACE_WITH_OWNER_EMAIL>";

private const string WORKFLOW_ID = "<REPLACE_WITH_WORKFLOW_ID>";
private const string WORKFLOW_NAME = "<REPLACE_WITH_WORKFLOW_NAME>";
private const string WORKFLOW_DESCRIPTION = "<REPLACE_WITH_WORKFLOW_DESCRIPTION>";
private const string TASK_NAME = "<REPLACE_WITH_TASK_NAME >";
private const string TASK_REFERENCE = "<REPLACE_WITH_TASK_REFERENCE_NAME>";

private const string VARIABLE_OLD_VALUE = "SOME_OLD_VALUE";
private const string VARIABLE_NAME_1 = "<REPLACE_WITH_VARIABLE_NAME_1>";
private const string VARIABLE_NEW_VALUE_1 = "<REPLACE_WITH_OWNER_VALUE_1>";
private const string VARIABLE_NAME_2 = "<REPLACE_WITH_VARIABLE_NAME_2>";
private const string VARIABLE_NEW_VALUE_2 = "<REPLACE_WITH_OWNER_VALUE_2>";


public void RegisterWorkFlow()
Expand Down Expand Up @@ -55,23 +52,7 @@ private ConductorWorkflow GetConductorWorkflow()
return conductorWorkFlow;
}

public void UpdateWorkflowVariablesWithWorkFlowId()
{
var orkesApiClient = new OrkesApiClient(new Configuration(),
new OrkesAuthenticationSettings(KEY_ID, KEY_SECRET));
var workflowClient = orkesApiClient.GetClient<WorkflowResourceApi>();
var workFlowVariables = new Dictionary<string, object>
{
{ VARIABLE_NAME_1, VARIABLE_NEW_VALUE_1 },
{ VARIABLE_NAME_2, VARIABLE_NEW_VALUE_2 }
};

workflowClient.UpdateWorkflowVariables(new Conductor.Client.Models.Workflow()
{
WorkflowId = WORKFLOW_ID,
Variables = workFlowVariables
});
}


}
}

0 comments on commit a586773

Please sign in to comment.