workflow approach? RRS feed

  • Question

  • Hello, I'm trying to implement a decoupled approach for saving data from cRM. I'd like to do this via workflows.  Based on SDK.SAMPLES.ExecuteWorkflowRequest, I created an encapsulated workflow request call.  I simply parameterized some of the values that were hard-coded:


    This allowed me to call a basic workflow based on an incident ID. However, now I have a scenario where I need to execute a workflow to execute logic based on the following parameters:

    * A set of case ID's
    * textParameter1
    * textParameter2

    I'd like to keep the call to ExecuteWorkflowRequest generic and reusable. However, I need a way to pass the parameters above to the workflow.  I could save this data to fields on the incident.  However, this feels like a hack. So can you recommend an approach for keeping my workflow request calls generic while avoiding adding parameters as field columns to the entity? 
    Wednesday, April 23, 2014 7:16 PM

All replies

  • Ok I figured out how to set an input parameter on the w/f CodeActivity:

    public InArgument<string> TestInput

    Then in my Execute method I can get the input value like this:

    string input = TestInput.Get(executionContext);

    So now I just need to figure out how to pass this parameter value via my ExecuteWorkflowRequest js.  Any suggestions?
    Wednesday, April 23, 2014 8:31 PM