Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bpmn-model): add script tasks extension element zeebe:script model api support #10693

Merged

Conversation

skayliu
Copy link
Contributor

@skayliu skayliu commented Oct 12, 2022

Description

Add new script tasks extension element zeebe:script model api, to support script tasks run in the engine, different from the job type.

<bpmn:scriptTask id="Activity_1f7zluu">
    <bpmn:extensionElements>
        <zeebe:script expression="=today()" resultVariable="result"/>
    </bpmn:extensionElements>
</bpmn:scriptTask>

Related issues

closes #10692

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix to the last two minor versions. You can trigger a backport by assigning labels (e.g. backport stable/1.3) to the PR, in case that fails you need to create backports manually.

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually
  • The change has been verified by a QA run
  • The impact of the changes is verified by a benchmark

Documentation:

  • The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.)
  • New content is added to the release announcement
  • If the PR changes how BPMN processes are validated (e.g. support new BPMN element) then the Camunda modeling team should be informed to adjust the BPMN linting.

Please refer to our review guidelines.

@skayliu
Copy link
Contributor Author

skayliu commented Oct 12, 2022

Hi, @saig0 , please check this out, I'll make the engine part PR after this been merged, thank you.

@skayliu skayliu changed the title feat(bpmn-model): add support script tasks model api feat(bpmn-model): add support script tasks extensionElements zeebe:script model api Oct 13, 2022
@skayliu skayliu changed the title feat(bpmn-model): add support script tasks extensionElements zeebe:script model api feat(bpmn-model): add script tasks extension element zeebe:script model api support Oct 13, 2022
@saig0
Copy link
Member

saig0 commented Oct 13, 2022

@skayliu thank you for your contribution. 🎉 We'll have a look at your PR in the next few days. 👀

@github-actions
Copy link
Contributor

github-actions bot commented Oct 13, 2022

Test Results

   945 files  +    3     945 suites  +3   1h 39m 47s ⏱️ - 1m 24s
7 396 tests  - 144  7 389 ✔️  - 144  7 💤 ±0  0 ±0 
7 587 runs   - 144  7 578 ✔️  - 144  9 💤 ±0  0 ±0 

Results for commit 308179f. ± Comparison against base commit d874691.

♻️ This comment has been updated with latest results.

Copy link
Member

@saig0 saig0 left a comment

Choose a reason for hiding this comment

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

@skayliu awesome. 🎉 Great job. 👍

Your PR is ready to merge. 🚀


This pull request counts toward the Hacktoberfest challenge. If you contributed four pull requests then you can complete your Camunda Hacktoberfest challenge here.

import org.camunda.bpm.model.xml.instance.ModelElementInstance;
import org.junit.jupiter.api.Test;

public class ScriptTaskBuilderTest {
Copy link
Member

Choose a reason for hiding this comment

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

👍 I like the idea to write a test for the builder.

@saig0 saig0 added the hacktoberfest-accepted Marks an issue as having been accepted as a Hacktoberfest contribution label Oct 19, 2022
@saig0
Copy link
Member

saig0 commented Oct 19, 2022

bors merge

@skayliu skayliu force-pushed the 10692-support-script-tasks-model-api branch from 36d2481 to 308179f Compare October 19, 2022 14:23
@skayliu
Copy link
Contributor Author

skayliu commented Oct 19, 2022

Hi, @saig0, Pleas retry again, I've rebased main.

@saig0
Copy link
Member

saig0 commented Oct 20, 2022

bors merge

@zeebe-bors-camunda
Copy link
Contributor

Build succeeded:

@zeebe-bors-camunda zeebe-bors-camunda bot merged commit 78458d9 into camunda:main Oct 20, 2022
@skayliu skayliu deleted the 10692-support-script-tasks-model-api branch October 20, 2022 05:20
zeebe-bors-camunda bot added a commit that referenced this pull request Nov 15, 2022
10775: feat(engine): support feel expression bpmn script tasks r=saig0 a=skayliu

## Description

Support feel expression bpmn script tasks, the bpmn-model part PR #10693

- the expression is evaluated in the Zeebe broker itself without providing an additional job worker
- the expression language is FEEL, like for the other attribute expressions
- the expression is represented in the workflow as BPMN script task

## Related issues

<!-- Which issues are closed by this PR or are related -->

closes #4213 



Co-authored-by: skayliu <skay463@163.com>
Co-authored-by: lzgabel <lz19960321lz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Marks an issue as having been accepted as a Hacktoberfest contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I can use bpmn model api to create a script task with feel expression
2 participants