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

Create Aliased existing records, DeepInsert service support for Business Process Flow #183

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

JanLosenicky
Copy link

@JanLosenicky JanLosenicky commented Jul 10, 2024

Prerequisites

Branch is based on this PR: #182

Purpose

Having already existing aliased records

Specify '@key' in .json data file to reference already existing record in database.

Enabling creation of records in specific Business Process Flow stage

Specify '@bpf' as an object with '@logicalName' and '@activestageid' to be able to move record to desired bpf stage.

Adding step binging [Given(@"'(.*)' exists")]

Added this binding which will call the same logic as the [Given(@"I have created '(.*)'")] so the human language makes more sense while having an existing record or record in specific bpf stage.

Example:

#Entity
@talxis_opportunityheader

Feature: Open Opportunity

Background:
	Given I am logged in to the 'TALXIS Sales' app as 'a salesman'
	And 'an existing account' exists
	And 'an opportunity in won stage' exists
	And I have opened 'the opportunity in won stage'
Scenario: Open Opportunity In Won Stage
	Given I have opened 'the opportunity in won stage'

an existing accounts.json

{
  "@logicalName": "account",
  "@alias": "the existing account",
  "@key": "126caa2c-9133-ef11-a316-7c1e5235b61b"
}

an opportunity.json

{
  "@logicalName": "talxis_opportunityheader",
  "@alias": "the opportunity",
  "talxis_name": "Test Opportunity",
  "[email protected]": "the existing account"
}

an opportunity in won stage.json

{
  "@extends":  "../an opportunity",
  "@logicalName": "talxis_opportunityheader",
  "@alias": "the opportunity in won stage",
  "@bpf": {
    "@logicalName": "talxis_opportunitybusinessprocessflow",
    "@activestageid": "b573544e-8c04-4b6d-ac3d-84d810d92ac1"
  }
}

Approach

  • adding [Given(@"'(.*)' exists")] binding
  • introducing RecordService with function to get existing record
  • update of dataManager to prevent cleanup of already existing records
  • update of deepInsertService to be able to work with '@bpf'
  • modifying and creating related tests

TODOs

  • Automated test coverage for new code
  • Documentation updated (if required)
  • Build and tests successful

@JanLosenicky JanLosenicky changed the title Users/jan.losenicky/lookups and existing records Create Aliased existing records, DeepInsert service support for Business Process Flow Jul 10, 2024
@ewingjm
Copy link
Member

ewingjm commented Jul 15, 2024

Hi @JanLosenicky. Thanks for the contributions. Could you please document the new features and, if possible, split them into separate pull requests?

@JanLosenicky
Copy link
Author

Hi @JanLosenicky. Thanks for the contributions. Could you please document the new features and, if possible, split them into separate pull requests?

Hello @ewingjm, I have separeted feature for creating records in specific BPF stage there: #184. I will create separete PR for aliased exsiting records soon.

Also this #182 needs to be merged first, lmk if there's anything blocking it.

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