Hi @christopherlecky, please check out the documentation of the CommServDBQuery activity. there are examples on how to use it
CommservDBQuery
Hi @christopherlecky, please check out the documentation of the CommServDBQuery activity. there are examples on how to use it
CommservDBQuery
In the case of inputs being defined in the workflow itself how do I access an activity that has not been executed yet?
I would assume the activity would have to executed prior to getting the results.
This is why I am asking how to execute the activity.
You would need to use interactive workflows, which would allow you to run db query activities and use the results to populate PopupInput activities. Once you are done with the data collection, then you would need to call EndUserSession before you begin the actual work of the workflow.
I’ve attached a small sample workflow to demonstrate this.
A couple of points:
- On General tab of the Workflow Properties, you need to set Start interactive session to true
- In the PopupInput activities, you go to Customize Inputs, and set the possible labels and values to the outputs of the db query activity.
Hello Chris, those options are set.
I opened a ticket for the problem that dynamic input rules are not working with user interaction activities.
The rules do happen to work with the workflow inputs themselves, but that raises this question of being able to do a query *prior to* the workflow form itself loading.
Which is I why I phrased the question the way I did.
This way I can run a script to execute the query and populate the inputs of the workflow form.
Currently workflows do not support executing a query prior to the input form loading.
Currently workflows do not support executing a query prior to the input form loading.
That makes sense but can the activity objects be interacted with purely in code?
the reason I ask is because some workflows are becoming gigantic physically just because of the size of the activities.
Essentially it’s much easier to navigate text that icons.
It doesn’t necessarily have to be on loading of the form, in fact if there was a simple was of calling a process block from a script that would be awesome.
I would take that since it would not require an answer for every activity type.
Here is some code that will allow you to execute a process block from script.
Not sure how good restartability will be with this but it will call the process block and pass whatever inputs you provide to it.
import commvault.cte.workflow.activities.ExecuteSuperProcess;
import commvault.cte.workflow.dom.WorkflowElement;
ExecuteSuperProcess esp = new ExecuteSuperProcess();
esp.inputs = WorkflowElement.parse("<inputs><input_1>one</input_1><input_2>two</input_2></inputs>");
esp.processBlock = WorkflowElement.parse("<processBlock>ProcessBlock_1</processBlock>");
esp.execute(workflow);
Absolute Genius, thank you Chris, I will test and report back.
Absolute Genius, thank you Chris, I will test and report back.
@Chris Sunderland is brilliant for sure!!