From 0ea78728a648d1a8c6f2da327cbfdf24ad307d17 Mon Sep 17 00:00:00 2001 From: Markus <5188411+Noordsestern@users.noreply.github.com> Date: Mon, 19 Feb 2024 22:21:31 +0100 Subject: [PATCH] Feature/camunda 7 20 (#87) * remove usage of deprecated keywords * fix typo * gitignore vscode and python builds * add TTL for 7.20 * update github actions to v4 * test python also on push * specific logs folders * update setup-python action v5 * dumdidum * remove outdated styleguide checks * another * remove xmlrunner from doctest * again * typo * update supported python versions * adjust readme skip-ci * update xunit publishing --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/python-package.yml | 13 +-- .github/workflows/robot-test.yml | 33 +++---- .gitignore | 3 + CamundaLibrary/CamundaResources.py | 97 ++++++++++++------- README.md | 4 + setup.py | 21 +++- tests/bpmn/demo_for_robot.bpmn | 50 +++++----- tests/bpmn/evaluate_decision.dmn | 4 +- tests/bpmn/message_test.bpmn | 38 ++++---- .../robot/Execution/test_start_process.robot | 24 ++--- .../robot/ExternalTask/test_bpmn_error.robot | 2 +- .../ExternalTask/test_dict_vars_to_json.robot | 8 +- .../ExternalTask/test_fetch_and_lock.robot | 4 +- .../test_get_amount_workloads.robot | 12 +-- .../ExternalTask/test_notify_failure.robot | 2 +- tests/robot/Message/deliver_message.robot | 2 +- .../test_delete_processes.robot | 2 +- .../test_get_activity_instance.robot | 2 +- .../test_get_all_instances.robot | 2 +- .../test_get_process_instance_variable.robot | 2 +- tests/robot/cleanup.resource | 2 +- 22 files changed, 182 insertions(+), 147 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index e0d0d89..d3f5cbd 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,7 +38,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index ef0475b..14b8c00 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -3,7 +3,7 @@ name: Python package -on: [ pull_request ] +on: [ push, pull_request ] jobs: build: @@ -14,22 +14,15 @@ jobs: python-version: ['3.8', '3.9', '3.10','3.11','3.12'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install flake8 xmlrunner if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Execute doctests run: | python CamundaLibrary/CamundaResources.py -v diff --git a/.github/workflows/robot-test.yml b/.github/workflows/robot-test.yml index a0f4943..3a1b30a 100644 --- a/.github/workflows/robot-test.yml +++ b/.github/workflows/robot-test.yml @@ -19,34 +19,25 @@ jobs: env: camunda.bpm.run.auth.enabled: ${{ matrix.auth_enabled }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Test with robot run: | pip install . sleep 10 robot -d logs -b debug.log -x xunit.xml -L DEBUG -V tests/robot/config_cicd.py -v CAMUNDA_HOST:http://camunda:8080 tests/robot/**/*.robot - name: Archive production artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: always() with: - name: robot logs + name: robot logs-${{matrix.camunda_version}}-${{matrix.auth_enabled}} path: | - logs/ - - publish-test-results: - name: "Publish Unit Tests Results" - needs: integrationtest - runs-on: ubuntu-latest - # the build-and-test job might be skipped, we don't need to run this job then - if: success() || failure() - - steps: - - name: Download Artifacts - uses: actions/download-artifact@v2 - with: - name: robot logs + logs + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: robot logs-${{matrix.camunda_version}}-${{matrix.auth_enabled}} - - name: Publish Unit Test Results - uses: EnricoMi/publish-unit-test-result-action@v1 - with: - files: xunit.xml + - name: Publish Unit Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: xunit.xml diff --git a/.gitignore b/.gitignore index 53ebdf2..05533f7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,11 +4,14 @@ logs/ log/ temp/ tmp/ +build/ .idea/ public/ lsp/ __pycache__/ +.vscode/ +*.egg-info *.log *.zip .robocop diff --git a/CamundaLibrary/CamundaResources.py b/CamundaLibrary/CamundaResources.py index 74c3d47..574eb4c 100644 --- a/CamundaLibrary/CamundaResources.py +++ b/CamundaLibrary/CamundaResources.py @@ -11,6 +11,7 @@ class CamundaResources: """ Singleton containing resources shared by Camunda sub libraries """ + _instance = None _client_configuration: Configuration = None @@ -19,7 +20,7 @@ class CamundaResources: def __new__(cls): if cls._instance is None: - print('Creating the object') + print("Creating the object") cls._instance = super(CamundaResources, cls).__new__(cls) # Put any initialization here. return cls._instance @@ -54,21 +55,30 @@ def api_client(self) -> ApiClient: def _create_task_client(self) -> ApiClient: if not self.client_configuration: - raise ValueError('No URL to camunda set. Please initialize Library with url or use keyword ' - '"Set Camunda URL" first.') + raise ValueError( + "No URL to camunda set. Please initialize Library with url or use keyword " + '"Set Camunda URL" first.' + ) # the generated client for camunda ignores auth parameters from the configuration. Therefore we must set default headers here: client = ApiClient(self.client_configuration) if self.client_configuration.username: - client.set_default_header('Authorization',self.client_configuration.get_basic_auth_token()) + client.set_default_header( + "Authorization", self.client_configuration.get_basic_auth_token() + ) elif self.client_configuration.api_key: identifier = list(self.client_configuration.api_key.keys())[0] - client.set_default_header('Authorization', self.client_configuration.get_api_key_with_prefix(identifier)) + client.set_default_header( + "Authorization", + self.client_configuration.get_api_key_with_prefix(identifier), + ) return client @staticmethod - def convert_openapi_variables_to_dict(open_api_variables: Dict[str, VariableValueDto]) -> Dict: + def convert_openapi_variables_to_dict( + open_api_variables: Dict[str, VariableValueDto] + ) -> Dict: """ Converts the variables to a simple dictionary :return: dict @@ -78,10 +88,15 @@ def convert_openapi_variables_to_dict(open_api_variables: Dict[str, VariableValu """ if not open_api_variables: return {} - return {k: CamundaResources.convert_variable_dto(v) for k, v in open_api_variables.items()} + return { + k: CamundaResources.convert_variable_dto(v) + for k, v in open_api_variables.items() + } @staticmethod - def convert_dict_to_openapi_variables(variabes: dict) -> Dict[str, VariableValueDto]: + def convert_dict_to_openapi_variables( + variabes: dict, + ) -> Dict[str, VariableValueDto]: """ Converts the variables to a simple dictionary :return: dict @@ -98,10 +113,14 @@ def convert_dict_to_openapi_variables(variabes: dict) -> Dict[str, VariableValue """ if not variabes: return {} - return {k: CamundaResources.convert_to_variable_dto(v) for k, v in variabes.items()} + return { + k: CamundaResources.convert_to_variable_dto(v) for k, v in variabes.items() + } @staticmethod - def convert_file_dict_to_openapi_variables(files: Dict[str, str]) -> Dict[str, VariableValueDto]: + def convert_file_dict_to_openapi_variables( + files: Dict[str, str] + ) -> Dict[str, VariableValueDto]: """ Example: >>> CamundaResources.convert_file_dict_to_openapi_variables({'testfile': 'tests/resources/test.txt'}) @@ -119,40 +138,48 @@ def convert_file_dict_to_openapi_variables(files: Dict[str, str]) -> Dict[str, V @staticmethod def convert_file_to_dto(path: str) -> VariableValueDto: if not path: - raise FileNotFoundError('Cannot create DTO from file, because no file provided') + raise FileNotFoundError( + "Cannot create DTO from file, because no file provided" + ) - with open(path, 'r+b') as file: - file_content = base64.standard_b64encode(file.read()).decode('utf-8') + with open(path, "r+b") as file: + file_content = base64.standard_b64encode(file.read()).decode("utf-8") base = os.path.basename(path) file_name, file_ext = os.path.splitext(base) - if file_ext.lower() in ['.jpg', '.jpeg', '.jpe']: - mimetype = 'image/jpeg' - elif file_ext.lower() in ['.png']: - mimetype = 'image/png' - elif file_ext.lower() in ['.pdf']: - mimetype = 'application/pdf' - elif file_ext.lower() in ['.txt']: - mimetype = 'text/plain' + if file_ext.lower() in [".jpg", ".jpeg", ".jpe"]: + mimetype = "image/jpeg" + elif file_ext.lower() in [".png"]: + mimetype = "image/png" + elif file_ext.lower() in [".pdf"]: + mimetype = "application/pdf" + elif file_ext.lower() in [".txt"]: + mimetype = "text/plain" else: - mimetype = 'application/octet-stream' - return VariableValueDto(value=file_content, type='File', value_info={'filename': base, 'mimetype': mimetype}) + mimetype = "application/octet-stream" + return VariableValueDto( + value=file_content, + type="File", + value_info={"filename": base, "mimetype": mimetype}, + ) @staticmethod def convert_to_variable_dto(value: Any) -> VariableValueDto: if isinstance(value, str): return VariableValueDto(value=value) - elif isinstance(value, Collection): # String is also a collection and must be filtered before Collection. - return VariableValueDto(value=json.dumps(value), type='Json') + elif isinstance( + value, Collection + ): # String is also a collection and must be filtered before Collection. + return VariableValueDto(value=json.dumps(value), type="Json") else: return VariableValueDto(value=value) @staticmethod def convert_variable_dto(dto: VariableValueDto) -> Any: - if dto.type == 'File': + if dto.type == "File": return dto.to_dict() - if dto.type == 'Json': + if dto.type == "Json": return json.loads(dto.value) return dto.value @@ -172,13 +199,17 @@ def dict_to_camunda_json(d: dict) -> Any: >>> CamundaResources.dict_to_camunda_json({'person': {'age': 25, 'languages': ['English', 'Suomi']}}) {'person': {'value': '{"age": 25, "languages": ["English", "Suomi"]}', 'type': 'Json'}} """ - return {k: {'value': json.dumps(v), 'type': 'Json'} if isinstance(v, Collection) else {'value': v} - for k, v in d.items()} + return { + k: ( + {"value": json.dumps(v), "type": "Json"} + if isinstance(v, Collection) + else {"value": v} + ) + for k, v in d.items() + } -if __name__ == '__main__': +if __name__ == "__main__": import doctest - import xmlrunner - suite = doctest.DocTestSuite() - xmlrunner.XMLTestRunner(output='logs').run(suite) + doctest.testmod() diff --git a/README.md b/README.md index 59e63ee..c7405c6 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ can be found [here](https://docs.camunda.org/manual/7.14/reference/rest/). **Please review [issue board](https://github.com/MarketSquare/robotframework-camunda/issues) for known issues or report one yourself. You are invited to contribute pull requests.** +Supporting: +- Python >= 3.8 +- Camunda 7 >= 7.14.0 + ## Documentation Keyword documentation is provided [here](https://robotframework-camunda-demos.gitlab.io/robotframework-camunda-mirror/latest/keywords/camundalibrary) diff --git a/setup.py b/setup.py index d5f5015..f191752 100644 --- a/setup.py +++ b/setup.py @@ -10,10 +10,12 @@ name = "Markus Stahl" version_regex = r"^v(?P\d*\.\d*\.\d*$)" -version = os.environ.get('CI_COMMIT_TAG', f'2.{os.environ.get("CI_COMMIT_REF_NAME","0.0")}') +version = os.environ.get( + "CI_COMMIT_TAG", f'2.{os.environ.get("CI_COMMIT_REF_NAME","0.0")}' +) full_version_match = re.fullmatch(version_regex, version) if full_version_match: - version = full_version_match.group('version') + version = full_version_match.group("version") setup( name="robotframework-camunda", @@ -28,7 +30,11 @@ classifiers=[ "Intended Audience :: Developers", "Natural Language :: English", - "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Software Development", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", @@ -36,6 +42,13 @@ "Framework :: Robot Framework", ], license="Apache License, Version 2.0", - install_requires=["robotframework>=3.2", "requests", "frozendict", 'generic-camunda-client>=7.15.0','requests_toolbelt','url-normalize'], + install_requires=[ + "robotframework>=3.2", + "requests", + "frozendict", + "generic-camunda-client>=7.15.0", + "requests_toolbelt", + "url-normalize", + ], include_package_data=True, ) diff --git a/tests/bpmn/demo_for_robot.bpmn b/tests/bpmn/demo_for_robot.bpmn index c6363f8..fe13aee 100644 --- a/tests/bpmn/demo_for_robot.bpmn +++ b/tests/bpmn/demo_for_robot.bpmn @@ -1,9 +1,9 @@ - + - + Flow_0xskn85 @@ -39,29 +39,6 @@ - - - - - - - - - - - - - - - - - - - - - - - @@ -86,6 +63,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/bpmn/evaluate_decision.dmn b/tests/bpmn/evaluate_decision.dmn index a12db2f..a032735 100644 --- a/tests/bpmn/evaluate_decision.dmn +++ b/tests/bpmn/evaluate_decision.dmn @@ -1,6 +1,6 @@ - - + + diff --git a/tests/bpmn/message_test.bpmn b/tests/bpmn/message_test.bpmn index ab95413..1360d43 100644 --- a/tests/bpmn/message_test.bpmn +++ b/tests/bpmn/message_test.bpmn @@ -1,11 +1,11 @@ - + - + Flow_0b7wd5l @@ -19,7 +19,7 @@ - + Flow_1y1q6p6 @@ -40,14 +40,6 @@ - - - - - - - - @@ -57,17 +49,17 @@ + + + + + + + + - - - - - - - - @@ -77,6 +69,14 @@ + + + + + + + + diff --git a/tests/robot/Execution/test_start_process.robot b/tests/robot/Execution/test_start_process.robot index 8db2792..7a3f982 100644 --- a/tests/robot/Execution/test_start_process.robot +++ b/tests/robot/Execution/test_start_process.robot @@ -14,7 +14,7 @@ ${PROCESS_DEFINITION_KEY} demo_for_robot *** Test Cases *** Test starting process # WHEN - ${process_instance} start process ${PROCESS_DEFINITION_KEY} + ${process_instance} Start Process Instance ${PROCESS_DEFINITION_KEY} [Teardown] delete process instance ${process_instance}[id] @@ -28,7 +28,7 @@ Test starting process with variables ${variables} Create Dictionary ${variable1_key}=${variable1_value} # WHEN - start process ${PROCESS_DEFINITION_KEY} ${variables} + Start Process Instance ${PROCESS_DEFINITION_KEY} ${variables} # AND ${first_workload} fetch workload topic=${existing_topic} @@ -50,7 +50,7 @@ Test starting process with business key ${expected_business_key} Set Variable business 1 # WHEN - start process ${PROCESS_DEFINITION_KEY} business_key=${expected_business_key} + Start Process Instance ${PROCESS_DEFINITION_KEY} business_key=${expected_business_key} # AND ${first_workload} fetch workload topic=${existing_topic} async_response_timeout=100 @@ -76,7 +76,7 @@ Test starting process with variables after activity ${after_activity_id} Set Variable Activity_process_element # WHEN - start process ${PROCESS_DEFINITION_KEY} ${variables} after_activity_id=${after_activity_id} + Start Process Instance ${PROCESS_DEFINITION_KEY} ${variables} after_activity_id=${after_activity_id} # AND ${first_workload} fetch workload topic=${existing_topic} @@ -97,7 +97,7 @@ Test starting process with variables before activity ${before_activity_id} Set Variable Activity_process_element # WHEN - start process ${PROCESS_DEFINITION_KEY} ${variables} before_activity_id=${before_activity_id} + Start Process Instance ${PROCESS_DEFINITION_KEY} ${variables} before_activity_id=${before_activity_id} # AND ${first_workload} fetch workload topic=${existing_topic} @@ -121,7 +121,7 @@ Test starting process with dict variables ${variables} Create Dictionary variables1=${variables1} # WHEN - start process ${PROCESS_DEFINITION_KEY} ${variables} + Start Process Instance ${PROCESS_DEFINITION_KEY} ${variables} # AND ${first_workload} fetch workload topic=${existing_topic} @@ -143,7 +143,7 @@ Test starting process with file variables ${files} Create Dictionary my_file=tests/resources/rf-logo.png # WHEN - start process ${PROCESS_DEFINITION_KEY} files=${files} + Start Process Instance ${PROCESS_DEFINITION_KEY} files=${files} # AND ${first_workload} fetch workload topic=${existing_topic} @@ -168,7 +168,7 @@ Test file content from starting process variable ${files} Create Dictionary my_file=${testfile} # WHEN - start process ${PROCESS_DEFINITION_KEY} files=${files} + Start Process Instance ${PROCESS_DEFINITION_KEY} files=${files} # AND ${first_workload} fetch workload topic=${existing_topic} @@ -194,7 +194,7 @@ Test starting process with file variables ${files} Create Dictionary my_file=tests/resources/rf-logo.png # WHEN - start process ${process_definition_key} files=${files} + Start Process Instance ${process_definition_key} files=${files} # AND ${first_workload} fetch workload topic=${existing_topic} @@ -220,7 +220,7 @@ Test file content from starting process variable ${files} Create Dictionary my_file=${testfile} # WHEN - start process ${process_definition_key} files=${files} + Start Process Instance ${process_definition_key} files=${files} # AND ${first_workload} fetch workload topic=${existing_topic} @@ -246,7 +246,7 @@ Test starting process with file variables ${files} Create Dictionary my_file=tests/resources/rf-logo.png # WHEN - start process ${process_definition_key} files=${files} + Start Process Instance ${process_definition_key} files=${files} # AND ${first_workload} fetch workload topic=${existing_topic} @@ -272,7 +272,7 @@ Test file content from starting process variable ${files} Create Dictionary my_file=${testfile} # WHEN - start process ${process_definition_key} files=${files} + Start Process Instance ${process_definition_key} files=${files} # AND ${first_workload} fetch workload topic=${existing_topic} diff --git a/tests/robot/ExternalTask/test_bpmn_error.robot b/tests/robot/ExternalTask/test_bpmn_error.robot index f668458..0e53100 100644 --- a/tests/robot/ExternalTask/test_bpmn_error.robot +++ b/tests/robot/ExternalTask/test_bpmn_error.robot @@ -20,7 +20,7 @@ BPMN error without task does not fail Test 'throw bpmn error' for existing topic [Setup] set camunda url ${CAMUNDA_HOST} # GIVEN - Start process ${PROCESS_DEFINITION_KEY} + Start Process Instance ${PROCESS_DEFINITION_KEY} ${variables} Create Dictionary text=Manna Manna # AND diff --git a/tests/robot/ExternalTask/test_dict_vars_to_json.robot b/tests/robot/ExternalTask/test_dict_vars_to_json.robot index aa256c3..f6a3ff9 100644 --- a/tests/robot/ExternalTask/test_dict_vars_to_json.robot +++ b/tests/robot/ExternalTask/test_dict_vars_to_json.robot @@ -70,13 +70,13 @@ List variable is of type JSON in camunda Process with dictionary variable ${my_dict} Create Dictionary a=1 b=2 ${variables} Create Dictionary map=${my_dict} - ${process_instance} start process ${PROCESS_DEFINITION_KEY} variables=${variables} + ${process_instance} Start Process Instance ${PROCESS_DEFINITION_KEY} variables=${variables} [Return] ${variables} Process with list variable ${my_dict} Create list 1 2 ${variables} Create Dictionary map=${my_dict} - ${process_instance} start process ${PROCESS_DEFINITION_KEY} variables=${variables} + ${process_instance} Start Process Instance ${PROCESS_DEFINITION_KEY} variables=${variables} [Return] ${variables} Workload is fetched @@ -86,11 +86,11 @@ Workload is fetched Process with dictionary variable is started ${my_dict} Create Dictionary a=1 b=2 ${variables} Create Dictionary map=${my_dict} - ${process_instance} start process ${PROCESS_DEFINITION_KEY} variables=${variables} + ${process_instance} Start Process Instance ${PROCESS_DEFINITION_KEY} variables=${variables} [Return] ${process_instance} Process with list variable is started ${my_dict} Create Dictionary a=1 b=2 ${variables} Create Dictionary map=${my_dict} - ${process_instance} start process ${PROCESS_DEFINITION_KEY} variables=${variables} + ${process_instance} Start Process Instance ${PROCESS_DEFINITION_KEY} variables=${variables} [Return] ${process_instance} diff --git a/tests/robot/ExternalTask/test_fetch_and_lock.robot b/tests/robot/ExternalTask/test_fetch_and_lock.robot index ebcfb41..0b311ae 100644 --- a/tests/robot/ExternalTask/test_fetch_and_lock.robot +++ b/tests/robot/ExternalTask/test_fetch_and_lock.robot @@ -14,7 +14,7 @@ ${EXISTING_TOPIC} process_demo_element *** Test Cases *** Test 'fetch and lock' for existing topic #GIVEN - start process ${PROCESS_DEFINITION_KEY} ${{{'variable_1': 1}}} + Start Process Instance ${PROCESS_DEFINITION_KEY} ${{{'variable_1': 1}}} #WHEN ${variables} fetch workload ${EXISTING_TOPIC} #THEN @@ -29,7 +29,7 @@ Test 'fetch and lock' with only specific variables ${input_variables} Create Dictionary ... ${variable_name1}=1 ... ${variable_name2}=2 - start process ${PROCESS_DEFINITION_KEY} ${input_variables} + Start Process Instance ${PROCESS_DEFINITION_KEY} ${input_variables} #WHEN ${variables} fetch workload ${EXISTING_TOPIC} variables=${{['${variable_name1}']}} diff --git a/tests/robot/ExternalTask/test_get_amount_workloads.robot b/tests/robot/ExternalTask/test_get_amount_workloads.robot index dfe895b..7273218 100644 --- a/tests/robot/ExternalTask/test_get_amount_workloads.robot +++ b/tests/robot/ExternalTask/test_get_amount_workloads.robot @@ -12,7 +12,7 @@ ${TOPIC_NAME} process_demo_element There shall be as many tasks as started processes [Documentation] https://github.com/MarketSquare/robotframework-camunda/issues/6 [Tags] issue-6 - [Template] Start processes and check amount of workloads + [Template] Start Process Instancees and check amount of workloads 1 2 4 @@ -20,27 +20,27 @@ There shall be as many tasks as started processes There shall be as many tasks as started processes [Documentation] https://github.com/MarketSquare/robotframework-camunda/issues/6 [Tags] issue-6 - [Template] Start process with business key and check for particular workload + [Template] Start Process Instance with business key and check for particular workload 1 2 4 *** Keywords *** -Start processes and check amount of workloads +Start Process Instancees and check amount of workloads [Arguments] ${n} Delete all instances from process '${PROCESS_DEFINITION_KEY}' FOR ${i} IN RANGE 0 ${n} - start process ${PROCESS_DEFINITION_KEY} + Start Process Instance ${PROCESS_DEFINITION_KEY} END ${amount_of_workloads} Get amount of workloads ${TOPIC_NAME} Should be equal as integers ${amount_of_workloads} ${n} -Start process with business key and check for particular workload +Start Process Instance with business key and check for particular workload [Arguments] ${n} Delete all instances from process '${PROCESS_DEFINITION_KEY}' FOR ${i} IN RANGE 0 ${n} - ${last_process_instance} start process ${PROCESS_DEFINITION_KEY} business_key=${i} + ${last_process_instance} Start Process Instance ${PROCESS_DEFINITION_KEY} business_key=${i} END ${amount_of_workloads} Get amount of workloads ${TOPIC_NAME} process_instance_id=${last_process_instance}[id] diff --git a/tests/robot/ExternalTask/test_notify_failure.robot b/tests/robot/ExternalTask/test_notify_failure.robot index 06edb21..7c8e9fb 100644 --- a/tests/robot/ExternalTask/test_notify_failure.robot +++ b/tests/robot/ExternalTask/test_notify_failure.robot @@ -51,7 +51,7 @@ Test 'Notify failure' with retries countdown *** Keywords *** A new process instance - Start process ${PROCESS_DEFINITION_KEY} + Start Process Instance ${PROCESS_DEFINITION_KEY} ${variables} Create Dictionary text=Manna Manna process instance fetched diff --git a/tests/robot/Message/deliver_message.robot b/tests/robot/Message/deliver_message.robot index 3789534..bd0518e 100644 --- a/tests/robot/Message/deliver_message.robot +++ b/tests/robot/Message/deliver_message.robot @@ -126,7 +126,7 @@ Prepare Test Suite Prepare testcase Delete all instances from process '${PROCESS_DEFINITION_KEY_SEND_MESSAGE}' Delete all instances from process '${PROCESS_DEFINITION_KEY_RECEIVE_MESSAGE}' - Start process ${PROCESS_DEFINITION_KEY_SEND_MESSAGE} + Start Process Instance ${PROCESS_DEFINITION_KEY_SEND_MESSAGE} Get workload from topic '${topic}' diff --git a/tests/robot/ProcessInstance/test_delete_processes.robot b/tests/robot/ProcessInstance/test_delete_processes.robot index 7a0e581..72fe311 100644 --- a/tests/robot/ProcessInstance/test_delete_processes.robot +++ b/tests/robot/ProcessInstance/test_delete_processes.robot @@ -12,7 +12,7 @@ Get all instances # Given Upload process ${process_instances_before} get all active process instances ${PROCESS_NAME} - start process ${PROCESS_NAME} + Start Process Instance ${PROCESS_NAME} ${process_instances_after} get all active process instances ${PROCESS_NAME} # EXPECT diff --git a/tests/robot/ProcessInstance/test_get_activity_instance.robot b/tests/robot/ProcessInstance/test_get_activity_instance.robot index 612386e..bcb1588 100644 --- a/tests/robot/ProcessInstance/test_get_activity_instance.robot +++ b/tests/robot/ProcessInstance/test_get_activity_instance.robot @@ -24,7 +24,7 @@ Get Process Definitions *** Keywords *** Process Instance Is Present - ${response} Start Process demo_for_robot + ${response} Start Process Instance demo_for_robot Set Global Variable ${PROCESS_INSTANCE_ID} ${response}[id] Camunda Is Requested For Activity Instances Of The Process Instance diff --git a/tests/robot/ProcessInstance/test_get_all_instances.robot b/tests/robot/ProcessInstance/test_get_all_instances.robot index 1707692..7ea88ea 100644 --- a/tests/robot/ProcessInstance/test_get_all_instances.robot +++ b/tests/robot/ProcessInstance/test_get_all_instances.robot @@ -15,7 +15,7 @@ Get all instances ${process_instances_before} get all active process instances ${PROCESS_NAME} # WHEN - start process ${PROCESS_NAME} + Start Process Instance ${PROCESS_NAME} ${process_instances_after} get all active process instances ${PROCESS_NAME} # THEN diff --git a/tests/robot/ProcessInstance/test_get_process_instance_variable.robot b/tests/robot/ProcessInstance/test_get_process_instance_variable.robot index 354e11a..93f31a8 100644 --- a/tests/robot/ProcessInstance/test_get_process_instance_variable.robot +++ b/tests/robot/ProcessInstance/test_get_process_instance_variable.robot @@ -43,7 +43,7 @@ A value Process Instance Is Present ${variable} Create Dictionary foo=${value} - ${response} Start Process demo_for_robot variables=${variable} + ${response} Start Process Instance demo_for_robot variables=${variable} Set Global Variable ${PROCESS_INSTANCE_ID} ${response}[id] Camunda Is Requested For Variable Of The Process Instance diff --git a/tests/robot/cleanup.resource b/tests/robot/cleanup.resource index 35f6cd2..3ec41f8 100644 --- a/tests/robot/cleanup.resource +++ b/tests/robot/cleanup.resource @@ -1,7 +1,7 @@ *** Settings *** Library CamundaLibrary ${CAMUNDA_HOST} -*** Variable *** +*** Variables *** ${CAMUNDA_HOST} http://localhost:8080 *** Keywords ***