This repository has been archived by the owner on May 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show pending activitties as History events
- Loading branch information
1 parent
6ed16d0
commit d84f445
Showing
4 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
client/routes/workflow/helpers/get-events-from-pending-activity.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const getEventsFromPendingActivity = (activities, idOffset) => { | ||
if (!activities) { | ||
return []; | ||
} | ||
|
||
if (Number.isInteger(idOffset)) { | ||
idOffset = Number(idOffset); | ||
} | ||
|
||
return activities.map((a, i) => { | ||
const event = { | ||
// pending: true, | ||
details: a, | ||
eventId: idOffset + i + 1, | ||
eventTime: a.scheduledTime, | ||
eventType: 'ActivityTaskStarted', | ||
}; | ||
|
||
return event; | ||
}); | ||
}; | ||
|
||
export default getEventsFromPendingActivity; |
This file contains 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
This file contains 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
This file contains 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