Hey Community! Can anyone help me to create a custom event?

M.Lambert
M.Lambert Contributor

I need to set up an automation between different spaces. TIA

Best Answer

  • Henry Simms
    Henry Simms Administrator
    Answer ✓

    The solution I have for this involves a few different steps. I'm assuming that the dataset is being refreshed ad-hoc (eg from a file source), rather than being refreshed automatically (eg from a database).

    To begin, I have

    • A Dataset in Space1 (MySourceData)
    • A View in Space1, which shares this data into Space2
    • A published workflow in Space2 (Execute when MySourceData refreshes) which should run on dataset refresh

    1. Set up a Custom Event in Space1 that will be shared to Space2

    Create a Custom Event and share it to Space2. This is what will trigger the workflow in Space2.

    2. Create a workflow in Space1 to trigger the custom event

    Create a very simple workflow that will trigger the custom event (using the Fire Event step) and publish it:

    3. Create an Automation in Space 1 to trigger when the Dataset is refreshed

    This Automation will cause the workflow we created in step 2 (Fire Event When MySourceData is refreshed, in Space1) to be executed.

    4. Include the Space1 Custom Event in Space2

    Navigate to Space2. Bring in the custom event that you created in step 1 (from Space1, using the "Include from another Space" option).

    5. Create an Automation in Space2 to trigger when the Space1 Custom Event occurs

    The Automation in Space2 will be triggered when the Space1 event is fired, and will cause the Space2 workflow (which you'd created earlier) to be executed

    Result

    The outcome of all this work should be that, when you refresh the MySourceData dataset, two workflows will execute:

    1. The Fire Event When MySourceData is refreshed workflow in Space1, triggered by the dataset refresh.
    2. The Execte when MySourceData refreshes workflow in Space2, triggered by the Space1 Custom Event.

Answers

  • Ivan Ng
    Ivan Ng Administrator
    edited May 10

    Hi M.Lambert,

    There is not much details to work on (maybe you can share more on what you're trying to achieve?) but the short answer is while automations are bound by space, you can actually create custom events and share it across other spaces. With that you will be able to trigger your automation in a different space when the custom event is fired. This works from Aperture Data Studio v2.8.7 onwards. Please refer to the release notes here for more details. Do let me know if this helps or if you have further questions. Thanks.

  • M.Lambert
    M.Lambert Contributor

    Hi Ivan, thanks for your help. I tried to create the custom event but I feel like I need to understand a bit more, for example: We divided the whole process that the data goes through into 3 spaces, so the output of one space gets saved as a view and shared with other space so how is this going to work? Does the custom event get the output from the other space and trigger the next workflow?

  • Henry Simms
    Henry Simms Administrator

    It sounds like this is the problem you're trying to solve:

    1. You have a Dataset in Space1
    2. That Dataset is shared via a View to Space2
    3. The View is then used in a Workflow in Space 2
    4. When the Dataset is refreshed in Space1, you want it to trigger the Workflow in Space2 to execute

    Is that correct?

  • M.Lambert
    M.Lambert Contributor

    Hey Henry, spot on that's exactly what I need. How I make this flow work without saving a view and sharing between spaces?

  • M.Lambert
    M.Lambert Contributor

    Ok Henry, that make sense. I will try that now and will let you know. Thanks a lot

  • M.Lambert
    M.Lambert Contributor

    Hi there, I just wanted to leave a comment here as I was trying to put the custom event in the beginning of the workflow but now realise is in the end. This is saying to the next workflow that the data has been refreshed, so the automation triggers for that workflow. Thanks a lot for your help Henry it all seems to be working now!