{
- if (processInstance && typeof params.spiff_step === 'undefined') {
+ if (processInstance && typeof params.to_task_guid === 'undefined') {
return processInstance.spiff_step || 0;
}
@@ -246,7 +246,7 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
return processInstance && currentSpiffStep() === processInstance.spiff_step;
};
- const spiffStepLink = (label: any, spiffStep: number) => {
+ const completionViewLink = (label: any, taskGuid: string) => {
const processIdentifier = searchParams.get('process_identifier');
const callActivityTaskId = searchParams.get('bpmn_process_guid');
const queryParamArray = [];
@@ -265,29 +265,13 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
{label}
);
};
- const previousStepLink = () => {
- if (showingFirstSpiffStep()) {
- return null;
- }
-
- return spiffStepLink(, currentSpiffStep() - 1);
- };
-
- const nextStepLink = () => {
- if (showingLastSpiffStep()) {
- return null;
- }
-
- return spiffStepLink(, currentSpiffStep() + 1);
- };
-
const returnToLastSpiffStep = () => {
window.location.href = processInstanceShowPageBaseUrl;
};
@@ -782,10 +766,10 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
}
if (task.typename === 'CallActivity') {
- console.log('task', task)
+ console.log('task', task);
const taskDefinitionPropertiesJson: TaskDefinitionPropertiesJson =
task.task_definition_properties_json;
- console.log('taskDefinitionPropertiesJson', taskDefinitionPropertiesJson)
+ console.log('taskDefinitionPropertiesJson', taskDefinitionPropertiesJson);
buttons.push(
- {taskToUse.task_spiff_step ? (
-
-
- Task completed at step:{' '}
- {spiffStepLink(
- `${taskToUse.task_spiff_step}`,
- taskToUse.task_spiff_step
- )}
-
-
-
-
- ) : null}
+
+
+ {completionViewLink(
+ 'View state at task completion',
+ taskToUse.guid
+ )}
+
+
+
+
{selectingEvent
? eventSelector(candidateEvents)
: taskDataContainer()}
@@ -1015,23 +996,6 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
return null;
};
- const stepsElement = () => {
- if (!processInstance) {
- return null;
- }
- return (
-
-
-
- {previousStepLink()}
- Step {currentSpiffStep()} of {processInstance.spiff_step}
- {nextStepLink()}
-
-
-
- );
- };
-
const buttonIcons = () => {
if (!processInstance) {
return null;
@@ -1119,7 +1083,6 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
{taskUpdateDisplayArea()}
{processDataDisplayArea()}
{processInstanceMetadataArea()}
- {stepsElement()}