After reading email, we often want more information about error and for that we must look at the flow trace to understand what caused this fault. For this usually the step is to login to OIC console then go to Monitoring -> Tracking and then filter based on Instance ID which usually consumes quite amount of time. However, we can totally save this time by embedding a hyperlink of Instance ID Tracking page in the email itself at design time.
Steps to achieve–
- In Notification Template create a reusable HTML body which contains Instance Id and before that add <a href='{InstanceBaseUrl}{InstanceId}'>
If you are sending instance details in table row, then it would look something like this
<tr>
<td width="200" valign="top"><b>Instance ID</b></td>
<td valign="top"><a href='{InstanceBaseUrl}{InstanceId}'>{InstanceId}</a></td>
</tr> - Set Parameter name and its value as
InstanceBaseUrl – concat($self/nsmpr0:metadata/nsmpr0:environment/nsmpr0:baseURL,'/integration/home/faces/link?page=tracking&tracking_id=')
InstanceId - $self/nsmpr0:metadata/nsmpr0:runtime/nsmpr0:instanceId - Activate and test. Your email should look like below screenshot and once you click on Hyperlink it will open that Instance ID.
For Integrations developed using Oracle SOA Suite - BPEL you can send Flow ID links in emails. To generate generic Flow ID url and use it-
- Navigate to SOA Infra -> Flow Instances and click on Search Options.
- Change Instance created Time to 7 days
- Click on Add/Remove Filter and remove all selection and check Flow Instance
- Click on generate Bookmarkable Link and copy the URL. It would look like this -
http://{hostname}:{port}/em/faces/ai/soa/infra?flowQuery=fId%3A{flow_id}%3Bct_twv%3A7%3Bct_twu%3Adays%3Bct_md%3Anormal%3B&type=oracle_soainfra&selectedTab=flowInstancesTab&target=/Domain_DefaultDomain/DefaultDomain/DefaultServer/soa-infra - There are some values which are env specific so, create two BPEL properties to store URL values, everything before flow_id as part1 and everything after that as part2. Now concat these in assign and add this as href in email which triggers from SOA, similarly to how we did in OIC. We can update config plans to with env specific properties values and then migrate.
No comments:
Post a Comment