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

Script task and sub process call activity example #2202

Merged
merged 3 commits into from
Jan 2, 2025

Conversation

usama9500
Copy link
Collaborator

@usama9500 usama9500 commented Jan 1, 2025

Added:

  • Script task properties panel
  • Call activity and Sub process simple example

Summary by CodeRabbit

  • Documentation
    • Enhanced documentation for SpiffArena with detailed sections on:
      • Script Task Properties
      • Sub-processes and Call Activities
    • Added comprehensive examples and use cases for better understanding
    • Improved section formatting and readability
    • Introduced detailed explanations of workflow components and their configurations

Copy link
Contributor

coderabbitai bot commented Jan 1, 2025

Warning

Rate limit exceeded

@usama9500 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 23 minutes and 36 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 921fa78 and f00023a.

📒 Files selected for processing (1)
  • docs/Building_Diagrams/Script_Tasks.md (1 hunks)
📝 Walkthrough

Walkthrough

The pull request introduces documentation updates for SpiffArena, focusing on two key areas: script task properties and sub-processes/call activities. The changes enhance the documentation by adding detailed explanations, example use cases, and structured information about script tasks and workflow components. The updates aim to provide clearer guidance for users working with SpiffArena's workflow design and scripting capabilities.

Changes

File Change Summary
docs/Building_Diagrams/Script_Tasks.md Added comprehensive documentation for script task properties, including sections on General, Documentation, Script, Instructions, and Input/Output Management. Included examples of script tasks, unit tests, and custom functions.
docs/Building_Diagrams/sub-processes_and_call_activities.md Restructured documentation with improved headings, added detailed examples of sub-processes (restaurant ordering system) and call activities (payment handling). Enhanced section formatting and clarity.

Sequence Diagram

sequenceDiagram
    participant User
    participant ScriptTask
    participant WorkflowContext
    participant CustomFunctions

    User->>ScriptTask: Configure Script Task
    ScriptTask->>WorkflowContext: Define Input Variables
    ScriptTask->>WorkflowContext: Execute Python Script
    WorkflowContext->>CustomFunctions: Utilize Available Functions
    ScriptTask->>WorkflowContext: Set Output Variables
    WorkflowContext-->>User: Return Workflow Results
Loading

This sequence diagram illustrates the basic workflow of a script task in SpiffArena, showing how users configure tasks, interact with the workflow context, and leverage custom functions during script execution.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
docs/Building_Diagrams/sub-processes_and_call_activities.md (3)

56-58: Fix list indentation for better markdown formatting.

The unordered lists under "Input Variables" and "Output Variables" have incorrect indentation.

-  - No specific inputs required in this example as tasks dynamically retrieve options from context or form
+- No specific inputs required in this example as tasks dynamically retrieve options from context or form

-  - `selected_items`: A dictionary containing the user's food selections (e.g., `{"Appetizer": "Spring Rolls", "Soup": "Tomato Soup", ...}`).
+- `selected_items`: A dictionary containing the user's food selections (e.g., `{"Appetizer": "Spring Rolls", "Soup": "Tomato Soup", ...}`).
🧰 Tools
🪛 Markdownlint (0.37.0)

56-56: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


58-58: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


98-98: Remove trailing punctuation from heading.

Remove the colon from the heading for consistency with markdown style guidelines.

-#### **Call Activity: Handle Payment**:
+#### **Call Activity: Handle Payment**
🧰 Tools
🪛 Markdownlint (0.37.0)

98-98: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)


88-96: Consider varying sentence structure in steps section.

Multiple consecutive sentences begin with "Step". Consider rewording for better readability.

-**Step 1**: **Enter Name** - A User Task that collects the customer's name.
-**Step 2**: **Select Food** - A Subprocess to handle food selection.
-**Step 3**: **Display Bill Value** - A Script Task to calculate the total bill.
-**Step 4**: **Handle Payment** - A Call Process that navigates to a payment-handling process.
-**Step 5**: **Order Confirmation** - A User Task that displays order confirmation.
+1. **Enter Name**: A User Task that collects the customer's name.
+2. **Select Food**: A Subprocess to handle food selection.
+3. **Display Bill Value**: A Script Task to calculate the total bill.
+4. **Handle Payment**: A Call Process that navigates to a payment-handling process.
+5. **Order Confirmation**: A User Task that displays order confirmation.
🧰 Tools
🪛 LanguageTool

[style] ~92-~92: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Subprocess to handle food selection. Step 3: Display Bill Value - A Script ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~94-~94: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...pt Task to calculate the total bill. Step 4: Handle Payment - A Call Proces...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~96-~96: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...gates to a payment-handling process. Step 5: Order Confirmation - A User Ta...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eaa2a0d and 921fa78.

⛔ Files ignored due to path filters (5)
  • docs/Building_Diagrams/images/Call_Activity.png is excluded by !**/*.png
  • docs/Building_Diagrams/images/Call_Activity1.png is excluded by !**/*.png
  • docs/Building_Diagrams/images/Script_task_update.png is excluded by !**/*.png
  • docs/Building_Diagrams/images/sub_process.png is excluded by !**/*.png
  • docs/Building_Diagrams/images/sub_process1.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • docs/Building_Diagrams/Script_Tasks.md (1 hunks)
  • docs/Building_Diagrams/sub-processes_and_call_activities.md (2 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/Building_Diagrams/Script_Tasks.md

[duplication] ~22-~22: Possible typo: you repeated a word
Context: ... collaboration or future updates. 3. Script - Script Field: A text area for entering the c...

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~34-~34: Possible typo: you repeated a word
Context: ...d debug scripts more effectively. 4. Instructions - Instructions Field: Use this section to define tas...

(ENGLISH_WORD_REPEAT_RULE)

docs/Building_Diagrams/sub-processes_and_call_activities.md

[style] ~92-~92: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Subprocess to handle food selection. Step 3: Display Bill Value - A Script ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~94-~94: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...pt Task to calculate the total bill. Step 4: Handle Payment - A Call Proces...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~96-~96: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...gates to a payment-handling process. Step 5: Order Confirmation - A User Ta...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🪛 Markdownlint (0.37.0)
docs/Building_Diagrams/sub-processes_and_call_activities.md

56-56: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


58-58: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


98-98: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)

🔇 Additional comments (5)
docs/Building_Diagrams/sub-processes_and_call_activities.md (3)

Line range hint 1-13: LGTM! Clear introduction and well-structured content.

The introduction effectively explains the distinction between sub-processes and call activities, providing clear guidance on their usage.

🧰 Tools
🪛 Markdownlint (0.37.0)

56-56: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


58-58: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


14-59: LGTM! Comprehensive sub-process documentation with clear examples.

The restaurant ordering system example effectively demonstrates the use of sub-processes, with clear explanations of each step and component.

🧰 Tools
🪛 Markdownlint (0.37.0)

56-56: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


58-58: Expected: 0; Actual: 2
Unordered list indentation

(MD007, ul-indent)


Line range hint 60-97: LGTM! Well-structured call process documentation with practical examples.

The payment handling example effectively demonstrates the use of call activities, with clear explanations of when and how to use them.

🧰 Tools
🪛 LanguageTool

[style] ~92-~92: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Subprocess to handle food selection. Step 3: Display Bill Value - A Script ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~94-~94: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...pt Task to calculate the total bill. Step 4: Handle Payment - A Call Proces...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~96-~96: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...gates to a payment-handling process. Step 5: Order Confirmation - A User Ta...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🪛 Markdownlint (0.37.0)

98-98: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)

docs/Building_Diagrams/Script_Tasks.md (2)

9-42: LGTM! Comprehensive documentation of script task properties.

The section provides clear explanations of all properties with helpful examples and proper formatting. The Python code example effectively demonstrates context variable usage.

🧰 Tools
🪛 LanguageTool

[duplication] ~22-~22: Possible typo: you repeated a word
Context: ... collaboration or future updates. 3. Script - Script Field: A text area for entering the c...

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~34-~34: Possible typo: you repeated a word
Context: ...d debug scripts more effectively. 4. Instructions - Instructions Field: Use this section to define tas...

(ENGLISH_WORD_REPEAT_RULE)


Line range hint 43-120: LGTM! Excellent examples and comprehensive function documentation.

The section provides:

  • Clear examples with both Python and JSON code
  • Well-documented pre/post script usage
  • Comprehensive table of custom functions with descriptions
🧰 Tools
🪛 LanguageTool

[duplication] ~22-~22: Possible typo: you repeated a word
Context: ... collaboration or future updates. 3. Script - Script Field: A text area for entering the c...

(ENGLISH_WORD_REPEAT_RULE)


[duplication] ~34-~34: Possible typo: you repeated a word
Context: ...d debug scripts more effectively. 4. Instructions - Instructions Field: Use this section to define tas...

(ENGLISH_WORD_REPEAT_RULE)

@burnettk burnettk merged commit 1aff5c0 into main Jan 2, 2025
23 checks passed
@burnettk burnettk deleted the script_task_and_sub_process_updates branch January 2, 2025 05:15
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.

2 participants