Created
September 20, 2019 16:45
-
-
Save rjcorwin/dac83456ef60d901c1e10b5a184e14d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// When viewing a form, the EventInstance's ID will be at position 5 in the URL hash. | |
const eventInstanceId = window.location.hash.split('/')[5] | |
// With the eventInstanceId, we can find the matching eventInstance in caseService.case.events. | |
const eventInstance = caseService.case.events.find(eventInstance => eventInstance.id === eventInstanceId) | |
// With the eventInstance handy, we can use the eventInstance.caseEventDefinitionId to find the EventDefinition inside of caseService.caseDefinition.eventDefinitions. | |
const eventDefinition = caseService.caseDefinition.eventDefinitions.find(eventDefinition => eventDefinition.id === eventInstance.caseEventDefinitionId) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment