2023-05-02 19:31:25 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
function error_handler() {
|
2024-04-17 18:53:10 +00:00
|
|
|
echo >&2 "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
|
2023-05-02 19:31:25 +00:00
|
|
|
exit "$2"
|
|
|
|
}
|
|
|
|
trap 'error_handler ${LINENO} $?' ERR
|
|
|
|
set -o errtrace -o errexit -o nounset -o pipefail
|
|
|
|
|
2024-04-17 18:53:10 +00:00
|
|
|
# db_name=spiffworkflow_backend_unit_testing
|
|
|
|
db_name=spiffworkflow_backend_local_development
|
|
|
|
|
|
|
|
mysql -uroot "$db_name" -e '
|
2023-05-02 19:31:25 +00:00
|
|
|
select * from process_instance;
|
|
|
|
|
2023-05-11 13:32:07 +00:00
|
|
|
select t.guid as task_guid, t.state as task_state, td.bpmn_identifier as task_id, t.properties_json from task t
|
2023-05-02 19:31:25 +00:00
|
|
|
join task_definition td on td.id = t.task_definition_id
|
2023-05-09 19:02:05 +00:00
|
|
|
where process_instance_id=(select max(id) from process_instance);
|
2023-05-02 19:31:25 +00:00
|
|
|
|
2023-05-11 13:32:07 +00:00
|
|
|
select bp.guid as bp_guid, bpd.bpmn_identifier as bp_identifier, bp.properties_json from bpmn_process bp
|
2023-05-02 19:31:25 +00:00
|
|
|
join bpmn_process_definition bpd on bpd.id = bp.bpmn_process_definition_id
|
|
|
|
join bpmn_process bpb on bpb.id = bp.direct_parent_process_id
|
|
|
|
join process_instance pi on bpb.id = pi.bpmn_process_id
|
2023-05-09 19:02:05 +00:00
|
|
|
where pi.id = (select max(id) from process_instance);
|
2023-05-02 19:31:25 +00:00
|
|
|
'
|
|
|
|
|
|
|
|
# mysql -uroot spiffworkflow_backend_local_development -e '\
|
|
|
|
# select * from task where guid="c40c3b06-4f49-4fa2-83e2-ba13776402a7"; \
|
|
|
|
# select * from bpmn_process; \
|
|
|
|
# '
|