Can we trigger events with a workflow activity?
When looking through this forum, I see some posts from users that want the same thing. However these posts are a quite old and haven't had any recent follow up.
The situation:
I have a form with an auto complete control. A user can search for a certain feature here. When the feature is selected, there are several controls in the form that are dependant on this auto complete control. For example, showing the attachments of the chosen feature. All works well here.
But now I have a button that allows the user to upload an attachment. The workflow is present in its OnClicked event. After uploading a file, it should then update the list of the attachments in the control that was dependant on the auto complete control. But how do I fire an OnChange event of the auto complete? I see no activity that is able to do this…
-
I think you can update your attachment list from the Change event of the Auto Complete?
1 -
Hi Nico,
Thanks for the reponse.
Currently the attachments are shown in an itempicker control. The items in this control are retrieved in the populate event, by getting the attachment infos from the feature selected in the autocomplete of the form. The itempicker control has a dependancy on the autocomplete control.
When uploading an attachment, the itempicker list should be refreshed. So I thought a good way of refreshing the whole form is by triggering the autocomplete change event. But I could also trigger the populate event of the itempicker. However, how to trigger these events from the subworkflow that's behind the upload button?
0 -
I would put the part where the attachment list is updated in a Subworkflow activity outside the form, and run that from both the autocomplete.change and button.click events
Another option would be to submit the form when the button is clicked, and then loop back so that the form is reloaded (with the current feature as input)
0 -
Hi Berend,
Thanks for the tip! That indeed solves my problem of having multiple copies of the same subworkflow.
I didn't know you could have subworkflows floating around inside a workflow.When using the run subworkflow activity, I noticed that to give the subworkflow ID it's not possible to use =$subworkflowid. Instead you need to use =activities.subworkflowid as stated in the documentation. That is a bit confusing…
0 -
Roan van der Kruijf The reason for the difference here is that the Run Subworkflow activity needs the name of the subworkflow, whereas =$subworkflowid would give you the outputs of the activity. Previously, the names were not readily available, so we added the activities object.
While you could type the name in manually, using =activities.subworkflowid has a few advantages.
- You get suggestions after you type the dot, so there's less chance of typos.
- If you subsequently rename the activity, the expression is automatically updated to match.
2
Please sign in to leave a comment.
Comments
5 comments