Reputation: 41
I've got a CWA, that's called from three different workflows - which means I have three different input parameters, all different entities.
How do I check the which has been passed through?
Example Input Parameter - Entity A Input Parameter - Entity B (this one is the calling workflow) Input Parameter - Entity C
Do you use the CodeActivityContext or input parameters to check this?
Thanks
Upvotes: 0
Views: 1849
Reputation: 17552
Well if you have an input parameters like this:
[Input("EntityReference A")]
[ReferenceTarget("account")]
public InOutArgument<EntityReference> EntityReferenceA { get; set; }
Then you can check if its been populated like this:
if (AccountReferenceA.Get(context) != null)
{
//Input A was passed
}
else if (AccountReferenceB.Get(context) != null)
{
//Input B was passed
}
else if (AccountReferenceC.Get(context) != null)
{
//Input C was passed
}
Upvotes: 2