Skip to main content

Can we trigger events with a workflow activity?

Comments

5 comments

  • Nico Burgerhart

    I think you can update your attachment list from the Change event of the Auto Complete?

    1
  • Roan van der Kruijf

    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
  • Berend Veldkamp

    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
  • Roan van der Kruijf

    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
  • Ken Lyon

    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.

    1. You get suggestions after you type the dot, so there's less chance of typos.
    2. If you subsequently rename the activity, the expression is automatically updated to match.
    2

Please sign in to leave a comment.