Switch activity looks ideal for your use case where you use integrer argument type in its properties.
Case : 2010
Inside the case you can invoke a workflow or activities where you extract the required values
Case : 2020
It’s logic
.
.
.
Case : 2040
It’s logic
You can also use Else-If activity where you check for each case starting from if and then else if for the rest of the scenarios.
but the thing is they already created one library in that one of the activity can act like
In that activity in properties panel it will ask us like which code and which data we will extract.
but for me there is total 5 codes and different data how can i use that library activity and how can i apply this switch activity
will you help me by using that activity how can i apply switch activity.
if non of the code will appeared we should throw an error.
@meeraa Since you are saying you have already library for this, I guess you need not to use any other activities like switch etc. You can utilize your library for this . Can you share the screenshot of the properties of your library where it will ask which code and what data to extract
i should use this code(pid) in the further process also. what should i do.
A-code-extracted values–based on A(code num) we will change which term offer is apply
B-code-extracted values–based on B(code num) we will change which term offer is apply
.
.
.
.
…
in these each CODE we are extracting 5 to 7 fields. if any one of the field is missing we should throw an exception. how to do it ? .
@meeraa Store the PID in a variable. So that you can used further in process
Also, for each code if you know what are the fields that need to be extracted, you can place those in config file in prior. This makes easy to check any one the field is empty for that code. The exp could be like this
(From S In ArrayValues
Where String.IsNullOrEmpty(S)
Select S).ToArray
ArrayValues variable contains the fields that it read from config