Good morning
Can i initiate a workflow after a row is created in a smartobject?
Please, let me know the steps to do it
Thank you very much
Juan Antonio
Good morning
Can i initiate a workflow after a row is created in a smartobject?
Please, let me know the steps to do it
Thank you very much
Juan Antonio
I am using an external application that updates a table related with an smartobject
Then, the issue is, when a new registry is created in this table (smartobject) i need to start a workflow
Thank you very much
Juan Antonio
Hi,
You will need an app to keep checking the database in a period of time and if there's new row a new instance will be started
I guess this would help with some modification to check your table
Hi,
Yes it is possible.
You can do it as part of the smartobject method call, but it only works with workflows designed in K2 Studio or K2 for Visual Studio.
In the properties of the workflow (right-click a blank area in the canvas > Properties) go to the Association details (2nd last, icon on the left).
Check the check box to Create Workflow Smartobjects.
This will now create methods that can be used to start this workflow.
Save and deploy your workflow.
Now edit the smartobject which should start the workflow.
Edit the SmartObject method which should start the workflow.
Switch it to advanced mode if it isn't already, and edit the specific method.
Add a new method call after your record has been created.
Browse to the Workflow service instance and look for the Start Workflow action for your workflow and bind it accordingly.
Save and Test.
This is very high level, but hopfully will get you on the right track.
Regards,
JohanL
Thank you for your anwer, fantastic explanation!!!
Then, is only allowed in K2 Studio?, in K2 Designer is not allowed?,
Basically, so far I've only worked with the designer, and I have experience with studio
Thank you
Juan Antonio
Yes, that is correct, workflows designed through the K2 Designer does not have this option exposed.
Hi, Johan!
could you please your solution explain step by step, 'cause i didn't get result.
when i binded my SO to workflow for start workflow action , at the deploy moment error fire, that didn't find smartobject .
please if you can resolve your solution step by step it will be appriciate .
thanks in advance .
Regards,
Ali.
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.