Skip to content

Commit

Permalink
👌 IMPROVE: Add customer with exception
Browse files Browse the repository at this point in the history
  • Loading branch information
jpontdia committed Nov 8, 2023
1 parent b9c2b42 commit aaf8870
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>078efef1-d139-48ed-92f5-f8d4a0592374</groupId>
<artifactId>micorp-customer-sapi-asset</artifactId>
<version>1.3.57</version>
<version>1.3.58</version>
<packaging>mule-application</packaging>
<name>micorp-customer-sapi</name>
<description>Mulesoft service for creating customers in Salesforce using data from the Corporate Orders System</description>
Expand Down
16 changes: 11 additions & 5 deletions src/main/mule/implementations/get.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:opentelemetry="http://www.mulesoft.org/schema/mule/opentelemetry"
<mule xmlns:validation="http://www.mulesoft.org/schema/mule/validation"
xmlns:opentelemetry="http://www.mulesoft.org/schema/mule/opentelemetry"
xmlns:salesforce="http://www.mulesoft.org/schema/mule/salesforce"
xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/ee/core
http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/salesforce
http://www.mulesoft.org/schema/mule/salesforce/current/mule-salesforce.xsd
http://www.mulesoft.org/schema/mule/opentelemetry
http://www.mulesoft.org/schema/mule/opentelemetry/current/mule-opentelemetry.xsd">
http://www.mulesoft.org/schema/mule/opentelemetry/current/mule-opentelemetry.xsd
http://www.mulesoft.org/schema/mule/validation http://www.mulesoft.org/schema/mule/validation/current/mule-validation.xsd">

<flow name="queryCustomer" >
<ee:transform doc:name="Where Filter" >
Expand Down Expand Up @@ -82,6 +83,11 @@ FROM Customer__c
value="#[attributes.queryParams.lastName]"
doc:name="lastName"
variableName="lastName"/>
<validation:is-true
doc:name="customer exception"
config-ref="Validation_Config"
expression="#[attributes.queryParams.firstName != 'Dart' and attributes.queryParams.lastName !='Vader']"
message="The error customer was sent to the service to make it fail and create and exception"/>
<flow-ref doc:name="queryCustomer" name="queryCustomer"/>
</flow>

Expand Down

0 comments on commit aaf8870

Please sign in to comment.