notion 400: get_toplevel_process_info instead of get_process_info
This commit is contained in:
parent
896da01701
commit
e71ff3f701
|
@ -7,6 +7,7 @@ from spiffworkflow_backend.models.script_attributes_context import (
|
||||||
from spiffworkflow_backend.scripts.script import Script
|
from spiffworkflow_backend.scripts.script import Script
|
||||||
|
|
||||||
|
|
||||||
|
# DEPRECATED: please use GetToplevelProcessInfo instead
|
||||||
class GetProcessInfo(Script):
|
class GetProcessInfo(Script):
|
||||||
"""GetProcessInfo."""
|
"""GetProcessInfo."""
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
"""Get_process_info."""
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
from spiffworkflow_backend.models.script_attributes_context import (
|
||||||
|
ScriptAttributesContext,
|
||||||
|
)
|
||||||
|
from spiffworkflow_backend.scripts.script import Script
|
||||||
|
|
||||||
|
|
||||||
|
class GetToplevelProcessInfo(Script):
|
||||||
|
"""GetProcessInfo."""
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def requires_privileged_permissions() -> bool:
|
||||||
|
"""We have deemed this function safe to run without elevated permissions."""
|
||||||
|
return False
|
||||||
|
|
||||||
|
def get_description(self) -> str:
|
||||||
|
"""Get_description."""
|
||||||
|
return """Returns a dictionary of information about the currently running process."""
|
||||||
|
|
||||||
|
def run(self, script_attributes_context: ScriptAttributesContext, *_args: Any, **kwargs: Any) -> Any:
|
||||||
|
"""Run."""
|
||||||
|
return {
|
||||||
|
"process_instance_id": script_attributes_context.process_instance_id,
|
||||||
|
"process_model_identifier": script_attributes_context.process_model_identifier,
|
||||||
|
}
|
|
@ -8,7 +8,6 @@ import {
|
||||||
Favorite,
|
Favorite,
|
||||||
Edit,
|
Edit,
|
||||||
View,
|
View,
|
||||||
ArrowRight,
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
} from '@carbon/icons-react';
|
} from '@carbon/icons-react';
|
||||||
import {
|
import {
|
||||||
|
|
Loading…
Reference in New Issue