Skip to content

FOUR-12003: Modeler now detects if process was generated by AI#1731

Merged
agustinbusso merged 9 commits intoepic/FOUR-11382from
FOUR-11429
Nov 23, 2023
Merged

FOUR-12003: Modeler now detects if process was generated by AI#1731
agustinbusso merged 9 commits intoepic/FOUR-11382from
FOUR-11429

Conversation

@TinCodes
Copy link
Contributor

@TinCodes TinCodes commented Nov 17, 2023

Issue & Reproduction Steps

The new features for AI Unified Generation need a way to detect if a process was made by AI so that it may suggest to create assets for the new process on Modeler.

Solution

  • Introduced a query string to communicate if the process was generated by the AI Generation tool.
  • Used window.ProcessMaker.modeler global variable to reach the Modeler project and have easy access to the check.

Related Tickets & Packages

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

'processmaker-modeler-data-output-association',
'processmaker-modeler-association',
],
multiplayer: null,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danloa what do you think about setting the multiplayer in null here? It is possible this generate unexpected behaviors with collaborative?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TinCodes if you want to disable multiplayer you can use the store src/store.js enableMultiplayer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a merge issue on my local, will remove it since multiplayer should not be affected by my changes

danloa
danloa previously requested changes Nov 17, 2023
'processmaker-modeler-data-output-association',
'processmaker-modeler-association',
],
multiplayer: null,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TinCodes if you want to disable multiplayer you can use the store src/store.js enableMultiplayer

'processmaker-modeler-data-output-association',
'processmaker-modeler-association',
],
isAiGenerated: window.ProcessMaker.modeler.isAiGenerated,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
isAiGenerated: window.ProcessMaker.modeler.isAiGenerated,
isAiGenerated: window.ProcessMaker?.modeler?.isAiGenerated,

@@ -1,5 +1,5 @@
<template>
<b-avatar-group class="container" v-if="!isMultiplayer">
<b-avatar-group class="container" v-show="!isMultiplayer">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think is better the v-if in this case. We don't want to render the template and this expensive component just to hide it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was done @rodriquelca but maybe I can change it here too

@rodriquelca
Copy link
Contributor

rodriquelca commented Nov 17, 2023

@TinCodes @josechirivella v-if tag will not render the component if isMultiplayer=false during the render, but v-show will render but hide, so the component need to be reactive for isMultiplayer prop.

@cypress
Copy link

cypress bot commented Nov 20, 2023

Passing run #932 ↗︎

0 276 83 0 Flakiness 0

Details:

Merge 7464017 into c301ab8...
Project: modeler Commit: 26ef5e2115 ℹ️
Status: Passed Duration: 10:16 💡
Started: Nov 23, 2023 7:25 PM Ended: Nov 23, 2023 7:35 PM

Review all test suite changes for PR #1731 ↗︎

@cypress
Copy link

cypress bot commented Nov 20, 2023

Passing run #893 ↗︎

0 276 83 0 Flakiness 0

Details:

Merge branch 'next' of github.com:ProcessMaker/modeler into FOUR-11429
Project: modeler Commit: e8f05f148e
Status: Passed Duration: 10:33 💡
Started: Nov 20, 2023 7:07 PM Ended: Nov 20, 2023 7:18 PM

Review all test suite changes for PR #1731 ↗︎

@TinCodes TinCodes changed the base branch from next to epic/FOUR-11382 November 23, 2023 19:17
@processmaker-sonarqube
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@TinCodes TinCodes dismissed danloa’s stale review November 23, 2023 19:26

Dante is on PTO and the changes he requested were made

@agustinbusso agustinbusso merged commit 91c9713 into epic/FOUR-11382 Nov 23, 2023
@agustinbusso agustinbusso deleted the FOUR-11429 branch November 23, 2023 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants