Formal Verification of Business Constraints in Workflow-Based Applications
Abstract
:1. Introduction
2. Related Work
3. Materials and Methods
3.1. A Formal Model for APEX Workflows
- Uncontrolled flow: this refers to a flow that is not influenced by any conditions and does not pass through a switch.
- Conditional flow: this flow is associated with a condition expression linked to a switch, which is evaluated at runtime to determine whether the flow will be executed.
- Timeout flow: this flow will be used only if a timeout occurs in the execution of the task to which it is connected.
- F = T ∪ S ∪ E is the set of flow objects, composed by tasks (T), switches (S), and events (E).
- C = CU ∪ CC ∪ CT denotes the set of connecting objects, composed by uncontrolled flows (CU), conditional flows (CC), and timeout flows (CT).
- ∏ denotes the finite set of names of flow objects (F) and connecting objects (C).
- π: F ∪ C → ∏ ∪ {none, timeout} is called the labeling function, defined as follows: for each workflow object o ∈ F ∪ C, π (o) ∈ ∏ is the name of the object o. For a more concise writing of business constraints, we will replace the descriptive name of a flow object with its static ID (from the workflow definition). Uncontrolled flows and timeout flows will be assigned the names none and timeout, respectively.
- estart is an element of the set of events E, denoting the start event.
- Eend ⊆ E is the set of end events.
- The function cπ: C → ∏ ∪ {none, timeout} assigns to each connecting object from C its condition expression. For simplicity, we will define cπ as restriction of π to C:
3.2. Alternating-Time Temporal Logic
- Λ = {1, …, k} is a nonempty, finite set representing all the agents involved in the system.
- Q is the finite set of states.
- Γ represents the finite set of propositions used to label the states of the model.
- γ: Q → 2Γ is called the labeling function, defined as follows: for every q∈Q, γ(q) is the set of propositions that are true at state q.
- M denotes the nonempty finite set of moves available in the system.
- The function d:Λ×Q→2M associates each agent a∈Λ and each state q∈Q with the set of available moves for agent a at state q. In the following, we will use the notation d(a,q) = da(q). For ∀q∈Q, a tuple <j1, …, jk> such that ja∈da(q) for ∀ a∈Λ represents a move vector at q.
- The transition function δ(q, <j1,…,jk>) associates each state q∈Q and each move vector <j1,…,jk> at q with the new state to which the system transitions if every player a∈Λ selects the move ja.
- For p∈ Γ, q⊨ p ⇔ p∈ γ(q).
- q⊨¬ϕ ⇔ q⊭ ϕ.
- q⊨ ϕ1∨ϕ2 ⇔ q⊨ ϕ1 or q⊨ ϕ2.
- q⊨ <<A>> ⚪ φ ⇔ there exists a strategy for each player in A, such that for each q-computation λ following these strategies, the formula ϕ is satisfied in the successor of q within computation λ (i.e., λ[1] ⊨ ϕ).
- q⊨ <<A>> □ φ ⇔ there exists a strategy for each player in A, such that for each q-computation λ following these strategies, the formula ϕ is satisfied in all states of computation λ (i.e., λ[i] ⊨ ϕ, ∀ i ≥ 0).
- q⊨ <<A>> ◊ φ ⇔ there exists a strategy for each player in A, such that for each q-computation λ following these strategies, the formula ϕ is satisfied in at least one state of computation λ (i.e., ∃ i ≥ 0 such that λ[i] ⊨ ϕ).
- q⊨ <<A>> φ1 U φ2 ⇔ there exists a strategy for each player in A, such that for each q-computation λ following these strategies, there exists a position i ≥ 0 such that λ[i] ⊨ ϕ2, and for all positions 0 ≤ j < i, it follows that λ[j] ⊨ ϕ1.
3.3. Formal Verification of APEX Workflows
- The system contains one agent, i.e., Λ = {1}.
- The set of states is Q = F.
- The finite set of propositions is defined by Γ = .
- The labeling function γ: Q → 2Γ is defined through the formula:
- The nonempty finite set of moves M includes all condition expressions, i.e.,
- The alternative moves function d: Λ×Q→2M is defined by expression , where represents the set of connecting objects outgoing from q.
- The transition function δ is defined as follows:
- (a)
- Whether the business processes function as described.
- (b)
- Whether the described behavior accurately reflects the intended process behavior.
4. Case Study
4.1. Analysis and Modeling of Business Logic
4.2. Formal Verification of Workflow Model
- Step 1:
- Determine the set of states of the ATL model in which Formula (1) is satisfied.
- Step 2:
- If estart belongs to this set, it means that there is at least one execution scenario in which the Payment state is reached without first going through the SendInvoiceEmail state. In this case, the business constraint is not satisfied.
- If estart does not belong to this set, the workflow design is correct in relation to this propriety of correctness.
4.3. Results
5. Business User Support Through Generative AI
5.1. Standard Prompting
“Which is the Alternating-time Temporal Logic (ATL) formula which means that there is an execution path from the beginning that reaches the PaymentConfirmation state without first reaching the SendInvoiceEmailToPatient state?”
5.2. Chain-of-Thought Prompting
- Basic request: “Can you answer this question using chain-of-thought reasoning?”
- Step-by-step explanation: “Can you explain your thought process step by step for this question?”
- Detailed reasoning: “Please explain your approach using chain-of-thought prompting.”
“The ATL formula <<A>> ((<<A>>◊ Payment) ∧ (¬ SendInvoiceEmail)) U Payment is equivalent with formula <<A>> ¬ SendInvoiceEmail U Payment?”
6. Conclusions
- An ATL model checker, encapsulated in the database for native calling (as a stored procedure).
- A parser to automatically translate the workflow model into an equivalent CGS.
- An AI assistant based on the GPT-4o model, designed to utilize chain-of-thought reasoning, to provide support in translating informal business constraints into ATL formulas.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Regis, G.; Villar, F.; Ricci, N. Fluent LogicWorkflow Analyser: A Tool for The Verification of Workflow Properties. Electron. Proc. Theor. Comput. Sci. 2014, 139, 46–51. [Google Scholar] [CrossRef]
- Su, G.; Liu, L. Workflow Trace Profiling and Execution Time Analysis in Quantitative Verification. Future Internet 2024, 16, 319. [Google Scholar] [CrossRef]
- Dechsupa, C.; Vatanawood, W.; Thongtak, A. Compositional Formal Verification for Business Process Models with Heterogeneous Notations Using Colored Petri Net. In Proceedings of the International MultiConference of Engineers and Computer Scientists 2019, IMECS 2019, Hong Kong, 13–15 March 2019. [Google Scholar]
- Mendoza, E.L.; Capel, I.M.; Pérez, M. Compositional Verification of Business Processes by Model-Checking. In Proceedings of the 8th International Workshop on Modelling, Simulation, Verification and Validation of Enterprise Information Systems (ICEIS 2010), Funchal, Madeira, Portugal, 8–9 June 2010; SCITEPRESS: Setúbal, Portugal, 2010; pp. 60–69, ISBN 978-989-8425-12-69. [Google Scholar] [CrossRef]
- TechTarget. Digital Process Automation. SearchCIO. Available online: https://www.techtarget.com/searchcio/definition/digital-process-automation (accessed on 16 October 2024).
- Ouazar, F.; Boukala, M.C.; Ioualalen, M. Business Process Modeled with BPMN and CTL Model Checking. Int. J. Cybern. Inform. 2023, 12, 157–169. [Google Scholar] [CrossRef]
- Ougaabal, K.; Zacharewicz, G.; Ducq, Y.; Tazi, S. Visual Workflow Process Modeling and Simulation Approach Based on Non-Functional Properties of Resources. Appl. Sci. 2020, 10, 4664. [Google Scholar] [CrossRef]
- Fu, X.; Bultan, T.; Su, J. Formal Verification of e-Services and Workflows. In Proceedings of the Web Services, E-Business, and the Semantic Web (WES 2002), Toronto, ON, Canada, 27–28 May 2002; Bussler, C., Hull, R., McIlraith, S., Orlowska, M.E., Pernici, B., Yang, J., Eds.; Lecture Notes in Computer Science. Springer: Berlin/Heidelberg, Germany, 2002; Volume 2512. [Google Scholar] [CrossRef]
- Davulcu, H.; Kifer, M.; Ramakrishnan, C.R.; Ramakrishnan, I.V. Logic-Based Modeling and Analysis. In Proceedings of the 17th ACM SIGART-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS 1998), Seattle, WA, USA, 1–3 June 1998; ACM: New York, NY, USA, 1998. [Google Scholar]
- Schroeder, M. Verification of Business Processes for a Correspondence Handling Center Using CCS. In Proceedings of the European Symposium on Validation and Verification of Knowledge Based Systems and Components, Oslo, Norway, 9–11 June 1999. [Google Scholar]
- Corradini, F.; Fornari, F.; Polini, A.; Re, B.; Tiezzi, F.; Vandin, A. BProVe: A Formal Verification Framework for Business Process Models. In Proceedings of the 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE 2017), Champaign, IL, USA, 30 October–3 November 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 217–228. [Google Scholar] [CrossRef]
- Wynn, M.T.; Verbeek, H.M.W.; van der Aalst, W.M.; ter Hofstede, A.H.; Edmond, D. Business Process Verification—Finally a Reality! Bus. Process Manag. J. 2009, 15, 74–92. [Google Scholar] [CrossRef]
- Ye, J.; Song, W. Transformation of BPMN Diagrams to YAWL Nets. J. Softw. 2010, 5, 396–404. [Google Scholar] [CrossRef]
- Decker, G.; Dijkman, R.; Dumas, M.; García-Bañuelos, L. Transforming BPMN Diagrams into YAWL Nets. In Business Process Management; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2008; Volume 5240, pp. 386–389. [Google Scholar]
- Dijkman, R.M.; Dumas, M.; Ouyang, C. Semantics and Analysis of Business Process Models in BPMN. Inf. Softw. Technol. 2008, 50, 1281–1294. [Google Scholar] [CrossRef]
- Huai, W.; Liu, X.; Sun, H. Towards Trustworthy Composite Service Through Business Process Model Verification. In Proceedings of the 7th International Conference on Ubiquitous Intelligence & Computing and 7th International Conference on Autonomic & Trusted Computing, Xi’an, China, 26–29 October 2010; IEEE: Piscataway, NJ, USA, 2010; pp. 422–427. [Google Scholar]
- Koniewski, R.; Dzielinski, A.; Amborski, K. Use of Petri Nets and Business Processes Management Notation in Modelling and Simulation of Multimodal Logistics Chains. In Proceedings of the 20th European Conference on Modeling and Simulation, Görlitz, Germany, 28 May–1 June 2006; pp. 28–31. [Google Scholar]
- Ramadan, M.Z.; Elmongui, H.G.; Hassan, R. BPMN Formalisation using Coloured Petri Nets. In Proceedings of the International Conference on Software Engineering & Applications (SEA 2011), Singapore, 12–13 December 2011. [Google Scholar]
- Awad, A.; Decker, G.; Lohmann, N. Diagnosing and Repairing Data Anomalies in Process Models. In Business Process Management Workshops; Lecture Notes in Business Information Processing (LNBIP); Springer: Berlin/Heidelberg, Germany, 2010; Volume 43, pp. 5–16. [Google Scholar]
- Kheldoun, A.; Barkaoui, K.; Ioualalen, M. Specification and Verification of Complex Business Processes—A High-Level Petri Net-Based Approach. In Business Process Management; Lecture Notes in Computer Science (LNCS); Springer: Berlin/Heidelberg, Germany, 2015; Volume 9253, pp. 55–71. [Google Scholar]
- Kheldoun, A.; Barkaoui, K.; Ioualalen, M. Formal Verification of Complex Business Processes Based on High-Level Petri Nets. Inf. Sci. 2017, 385–386, 39–54. [Google Scholar] [CrossRef]
- Wong, P.Y.H.; Gibbons, J. A Process Semantics for BPMN. In Formal Methods and Software Engineering; Lecture Notes in Computer Science (LNCS); Springer: Berlin/Heidelberg, Germany, 2008; Volume 5256, pp. 355–374. [Google Scholar]
- Corradini, F.; Polzonetti, A.; Re, B.; Falcioni, D. An Eclipse Plug-in for Formal Verification of BPMN Processes. In Proceedings of the 3rd International Conference on Communication Theory, Reliability, and Quality of Service, Athens, Greece, 13–19 June 2010; pp. 144–149. [Google Scholar]
- Corradini, F.; Polini, A.; Polzonetti, A.; Re, B. Business Processes Verification for e-Government Service Delivery. Inf. Syst. Manag. 2010, 27, 293–308. [Google Scholar] [CrossRef]
- Polini, A.; Polzonetti, A.; Re, B. Formal Methods to Improve Public Administration Business Processes. RAIRO-Theor. Inform. Appl. 2012, 46, 203–229. [Google Scholar] [CrossRef]
- Mangi, F.A.; Su, G.; Zhang, M. Advancing Verification of Process Mining Models with Quantitative Model Checking in Stochastic Environment. ITM Web Conf. 2024, 60, 00012. [Google Scholar] [CrossRef]
- Lam, V.S.W. Formal Analysis of BPMN Models: A NuSMV-Based Approach. Int. J. Softw. Eng. Knowl. Eng. 2010, 20, 987–1023. [Google Scholar] [CrossRef]
- Suchenia, A.; Wiśniewski, P.; Ligęza, A. Overview of Verification Tools for Business Process Models. Ann. Comput. Sci. Inf. Syst. 2017, 13, 295–302. [Google Scholar]
- Mendoza Morales, L.E. Business Process Verification: The Application of Model Checking and Timed Automata. CLEI Electron. J. 2014, 17, 3. [Google Scholar] [CrossRef]
- Watahiki, K.; Ishikawa, F.; Hiraishi, K. Formal Verification of Business Processes with Temporal and Resource Constraints. In Proceedings of the 2011 IEEE International Conference on Systems, Man, and Cybernetics, Anchorage, AK, USA, 9–12 October 2011; pp. 1173–1180. [Google Scholar] [CrossRef]
- Nguyen Thanh, T.; Le Thanh, N.; Hoang Thi Thanh, H.; Ha Thi, T. VeBPRu: A Toolchain for Formally Verifying Business Processes and Business Rules. In Proceedings of the 2023 8th International Conference on Intelligent Information Technology (ICIIT 2023), Da Nang, Vietnam, 24–26 February 2023; pp. 15–19. [Google Scholar] [CrossRef]
- Bistarelli, S.; Di Noia, T.; Mongiello, M.; Nocera, F. PrOnto: An Ontology Driven Business Process Mining Tool. Procedia Comput. Sci. 2017, 112, 306–315. [Google Scholar] [CrossRef]
- Hlaoui, Y.B.; Ayari, S.; Ayed, L.J.B. Towards an Automatic Verification of BPMN Model Semantic Preservation During a Refinement Process. In Software Technologies. ICSOFT 2018; van Sinderen, M., Maciaszek, L., Eds.; Communications in Computer and Information Science; Springer: Cham, Switzerland, 2019; Volume 1077. [Google Scholar] [CrossRef]
- Lopes, T.; Guerreiro, S. FlowTGE: Automating Functional Testing of Executable Business Process Models Based on BPMN. In Advances in Conceptual Modeling. ER 2023; Sales, T.P., Araújo, J., Borbinha, J., Guizzardi, G., Eds.; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2023; Volume 14319. [Google Scholar] [CrossRef]
- Groefsema, H.; Bucur, D. A Survey of Formal Business Process Verification: From Soundness to Variability. In Proceedings of the Third International Symposium on Business Modeling and Software Design (BMSD 2013), Noordwijkerhout, The Netherlands, 8–10 July 2013; pp. 198–203. [Google Scholar] [CrossRef]
- Matthew Mulvaney. Oracle APEX Tutorial. Available online: https://pretius.com/blog/oracle-apex-tutorial/ (accessed on 16 October 2024).
- Alur, R.; Henzinger, T.A.; Kupferman, O. Alternating-Time Temporal Logic. J. ACM 2002, 49, 672–713. [Google Scholar] [CrossRef]
- Kacprzak, M.; Penczek, W. Fully Symbolic Unbounded Model Checking for Alternating-Time Temporal Logic. Auton. Agents Multi-Agent Syst. 2005, 11, 69–89. [Google Scholar] [CrossRef]
- Stoica, L.F.; Stoica, F. ATLDesigner: ATL Model Checking Using an Attribute Grammar. Int. J. Softw. Eng. Knowl. Eng. 2022, 32, 1125–1154. [Google Scholar] [CrossRef]
- Anderson, B.B.; Hansen, J.V.; Lowry, P.B.; Summers, S.L. Model Checking for Design and Assurance of e-Business Processes. Decis. Support Syst. 2005, 39, 333–344. [Google Scholar] [CrossRef]
- Stoica, F.; Stoica, L.F. Integrated Tool for Assisted Predictive Analytics. In Proceedings of the MDIS 2020—Modelling and Development of Intelligent Systems, Sibiu, Romania, 22–24 October 2020; Simian, D., Stoica, L.F., Eds.; Springer: Cham, Switzerland, 2021; Volume 1341, pp. 127–139. [Google Scholar] [CrossRef]
- Oracle LiveLabs Workshop. Available online: https://apexapps.oracle.com/pls/apex/r/dbpm/livelabs/run-workshop?p210_wid=3880 (accessed on 16 October 2024).
- Patig, S.; Stolz, M. A Pattern-Based Approach for the Verification of Business Process Descriptions. Inf. Softw. Technol. 2013, 55, 58–87. [Google Scholar] [CrossRef]
- Wei, J.; Wang, X.; Schuurmans, D.; Bosma, M.; Ichter, B.; Xia, F.; Chi, E.; Le, Q.V.; Zhou, D. Chain-of-Thought Prompting Elicits Reasoning in Large Language Models. Adv. Neural Inf. Process. Syst. 2022, 35, 24824–24837. [Google Scholar]
- Wang, B.; Min, S.; Deng, X.; Shen, J.; Wu, Y.; Zettlemoyer, L.; Sun, H. Towards Understanding Chain-of-Thought Prompting: An Empirical Study of What Matters. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics, Toronto, ON, Canada, 9–14 July 2023; Association for Computational Linguistics: Stroudsburg, PA, USA, 2023; Volume 1, pp. 2717–2739. [Google Scholar]
- Ayub, H. GPT-4o: Successor of GPT-4. Available online: https://hamidayub.medium.com/gpt-4o-successor-of-gpt-4-8207acf9104e (accessed on 16 October 2024).
Loading libraries |
loadjava -thin -user userName/password@//localhost:1521/freepdb1 -verbose .\antlrworks-1.4.jar .\javax.json.jar .\json.jar |
Loading the ATL model checker classes |
loadjava -thin -user userName/password@//localhost:1521/freepdb1 -verbose .\ATLLexer.java .\ATLParser.java .\ATLJson.java .\ATLChecker.java |
The PL/SQL wrapper to invoke the ATL model checker |
CREATE OR REPLACE FUNCTION ATL_CHECKER (model IN CLOB, length IN NUMBER, response IN OUT CLOB) RETURN VARCHAR2 AS LANGUAGE JAVA NAME ‘ATLChecker.checkModel(oracle.sql.CLOB, int, oracle.sql.CLOB[]) return java.lang.String’; |
Standard prompting |
Comparison:
The two formulas are not equivalent. The first formula is stronger because it requires coalition A to have a strategy to eventually bring about the payment, whereas the second formula only ensures that no invoice email is sent until payment occurs, without requiring that A can force payment. |
Chain-of-thought prompting |
Let us break down the equivalence of the formulas step by step using chain-of-thought reasoning: We are comparing two ATL (Alternating Temporal Logic) formulas:
⟨⟨A⟩⟩ ((⟨A⟩◊ Payment)∧(¬SendInvoiceEmail)) U Payment
Formula 1 is as follows:
⟨⟨A⟩⟩ ((⟨A⟩◊ Payment)∧(¬SendInvoiceEmail)) U Payment
Formula 2 is as follows:
⟨⟨A⟩⟩ ¬SendInvoiceEmail U Payment
The two formulas are equivalent because the additional condition in Formula 1 does not affect the overall meaning. The U operator in both formulas already implies that Payment will eventually occur, and SendInvoiceEmail must not happen before that. Therefore,
⟨⟨A⟩⟩ ((⟨A⟩◊ Payment)∧(¬SendInvoiceEmail)) U Payment
⟨⟨A⟩⟩ ¬SendInvoiceEmail U Payment
|
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Stoica, F.; Stoica, L.F. Formal Verification of Business Constraints in Workflow-Based Applications. Information 2024, 15, 778. https://doi.org/10.3390/info15120778
Stoica F, Stoica LF. Formal Verification of Business Constraints in Workflow-Based Applications. Information. 2024; 15(12):778. https://doi.org/10.3390/info15120778
Chicago/Turabian StyleStoica, Florin, and Laura Florentina Stoica. 2024. "Formal Verification of Business Constraints in Workflow-Based Applications" Information 15, no. 12: 778. https://doi.org/10.3390/info15120778
APA StyleStoica, F., & Stoica, L. F. (2024). Formal Verification of Business Constraints in Workflow-Based Applications. Information, 15(12), 778. https://doi.org/10.3390/info15120778