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 d7c4f85
Showing
4 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
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,18 @@ | ||
const getEventsFromPendingActivity = (activities, idOffset) => { | ||
if (!activities) { | ||
return []; | ||
} | ||
|
||
if (Number.isInteger(idOffset)) { | ||
idOffset = Number(idOffset); | ||
} | ||
|
||
return activities.map((a, i) => ({ | ||
details: a, | ||
eventId: idOffset + i + 1, | ||
eventTime: a.scheduledTime, | ||
eventType: 'ActivityTaskStarted', | ||
})); | ||
}; | ||
|
||
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