Imaging - Hard

Resource Page Link

This is the Seymore Imaging administration portal, where you will set the web trigger URL, copy your API key and watch mail items arrive.

https://pathfinder.automationanywhere.com/challenges/training/SeymoreImaging/index.html#/administration

Control Room Link

This is the link to the control room you will be performing all hands on activities within.

https://aa-community.cloud.automationanywhere.digital/

1. Set Up Your Folders

You will publish something to the public folder that is unique to you, so you can see your own agent working. To do that, you first create a private folder structure and a copy of the completed build.

Steps:

  1. Click Automation and go to your Private folder tab.
  2. Next to Bots, click the folder+ icon to add a new folder and name it:
    Users
  3. Next to the Users folder, click the folder+ icon again and enter your exact username. Note: this is case sensitive.
  4. Click the Public tab and browse to Bots/BAA/SeymoreImaging/Hard. Find SeymoreImagingProcess, hover over the 3-dot context menu on the right and click Clone Process. In the Clone File window, click Clone in the top right.
  5. You now have a private clone of the completed SeymoreImaging build, and you will take it further by adding an event trigger. Normally you would do this inside the same file, but so that everyone can do this against the same file, you will copy it into your user folder. Confirm you are in Private and looking at the cloned files, hover over the same 3-dot menu and click Copy.
  6. In the copy modal, click Choose, then click Browse in the top right and navigate to the user folder you created earlier. Click Choose at the bottom.

2. Create Your Listener

The process should start automatically from an event trigger, and it needs to know which mail item to gather. To do that, you need a listener.

Steps:

  1. In the left sidebar, click Manage > Event Triggers, then click the Listeners tab.
  2. Click the plus sign on the right above the table and name the listener with your username, or something you will be able to remember and find easily.

3. Modify Your Process

Steps:

  1. Return to Automation, navigate to your user folder and open SeymoreImagingProcess.
  2. In the left sidebar, find Triggers and click Show.
  3. Click Universal web trigger and drag Incoming webhook above the start node.
  4. In the right sidebar, open the Incoming webhook drop-down menu and select your listener name.
  5. You could require special validation, which would allow only fully authenticated requests to write to your listener, by modifying the signature scheme. You will not do that here, so set Signature scheme to No Validation.
  6. Browse to the Seymore Imaging administration portal for information about what is sent in the web trigger.
  7. Note that the request does not send all the mail item details. It sends which mail item just came in. Return to the process and create a new variable named:
    NewMailID
    Set it as an input.
  8. Click the Universalwebtrigger block at the top of your process. At the bottom, in Response, click Multiple variables, then click Add variable mapping.
  9. The payload sent from the portal uses the key New Mail ID. Paste this into the Key field:
    New Mail ID
    In Map to variable, select the variable you just created.
  10. Return to the Seymore Imaging portal and click My Profile (bottom left). Copy your API key. Back in the process, find APIKey in the variables, click the 3 dots to its right and click Edit Variable. Paste your API key in the Default value field at the bottom. In a real scenario, you would use a credential variable stored in a vault instead of passing the key around in plain text, so you can scope what access your agent has and when, and prevent the key from getting out.
  11. Now send the new information into the Get Next Message action. As you may remember from Medium, this was built to get the next item in two ways: a blank item or a specific item. In the blank variable field for messageWorkIDNumber in the properties pane, paste:
    $NewMailID$
  12. Click the AI Agent node. Under Task assignment, click Team and choose:
    Pathfinder Summit Imaging Insurgency
    Save your process and close it.

4. Create a Public Event Trigger

Steps:

  1. In your user folder, click the 3-dot menu on the right of your process and click Check in process. Add a comment such as "preparing event trigger" and click Check in.
  2. In the sidebar, click Event Triggers.
  3. Make sure you are in the Public section and click the plus sign in the top right of the table. Click Choose, find your public process, click it and click Choose again.
  4. Click Team/Role Assignment. If you click Choose for either option, both are blank. Click Process Setup (in the middle of the paragraph) to set up a team. This scopes the permissions of the execution. This process has no task bots or Co-Pilot tasks, but if it did, you would need to declare where they should run and who should see the assigned human tasks. Team setup is how you do that.
  5. Enter a process key: pick 5 random letters and type them in Process Key. Click Confirm on the pop-up. If your key is identical to someone else's, you were not as random as you thought.
  6. Click the User Group tab at the top.
  7. On the far right, click the plus sign, click Add Teams and find Pathfinder Summit Imaging Insurgency. Click Add and Save. Close this view, then close the tab. Back in Team/Role Assignment, click Team, click Choose, select the team and click Choose again. Once it is selected, click Add Event Triggers. In a real organization, fully scoping access means setting up a team and all the features in users and roles. That happens at the administrator level, not at the developer level, and it ensures access is scoped correctly. This team was created with just enough permissions for what you are doing today.
  8. Click the SeymoreImagingProcess link to get back into your process. Click your Universalwebtrigger node and, in the URL property on the right, triple-click to select the entire URL and copy it. Read the note under it: "Enter the generated URL in your application to create the listener." You will do that now in the Seymore Imaging administration portal. In the Web Trigger URL field, paste your link.
  9. Click Save and Start Intake.
  10. Open the Mailbox and watch items arrive and, after a few moments, become marked as read. Items arrive every 20 seconds. You can also watch your My Studies section fill up and those studies get assigned while the agent works, because you initiated the web trigger. You do not have access to the audit log or AARI, but your facilitator can show them on screen.