• Jaishree Naidu
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 1
    Replies
I am working on Mulesoft Integration module Automate Order-to-Cash Process Using MuleSoft Flow Designer, while on step Trigger SMS Using the Twilio Connector, STEP 7 indicates  copying following code:
Body: "Order for " ++ vars.OppDetails.Name ++ " has been placed.
Details:
" ++ "OrderID: " ++ payload.OrderID as String ++ ", Tracking: "
++ payload.TrackingNo ++ ", ETA:" ++ payload.ETA as Date
The above code in the transform indicates error in Anypoint Platform:
Error: event:22c3f4a0-382e-11ea-b070-02766eec795c ********************************************************************************Message               : "You called the function 'Value Selector' with these arguments:   1: String ("payload" as String {encoding: "UTF-8", mediaType: "*/*; charset=UTF-8", mime...)  2: Name ("Id")But it expects one of these combinations:  (Array, Name)  (Array, String)  (Date, Name)  (DateTime, Name)  (LocalDateTime, Name)  (LocalTime, Name)  (Object, Name)  (Object, String)  (Period, Name)  (Time, Name)5|   OppId: vars.OppDetails.Id,            ^^^^^^^^^^^^^^^^^^Trace:  at main (line: 5, column: 10)" evaluating expression: "%dw 2.0output application/json  ---{  OppId: vars.OppDetails.Id,  OrderAmount: vars.OppDetails.Amount,  orderdate: vars.OppDetails.CloseDate,  productInfo: {    productID: payload[0].productID,    category: payload[0].category,    SKU: payload[0].SKU,    productName: payload[0].productName,    inventory: payload[0].inventory  }}".Element               : salesforce_to_twilio_connector/processors/2 @ ordertocashautomation-updu:mule-config.xml:38 (Transform)Element XML           : <ee:transform doc:id="069f6d19-8dbc-4dbb-ad0c-fe9fe9e40bf2" doc:name="Transform" doc:timestamp="1579157186684">                        <ee:message>                        <ee:set-payload>%dw 2.0                        output application/json                          ---                        {                          OppId: vars.OppDetails.Id,                          OrderAmount: vars.OppDetails.Amount,                          orderdate: vars.OppDetails.CloseDate,                          productInfo: {                            productID: payload[0].productID,                            category: payload[0].category,                            SKU: payload[0].SKU,                            productName: payload[0].productName,                            inventory: payload[0].inventory                          }                        }</ee:set-payload>                        </ee:message>                        </ee:transform>Error type            : MULE:EXPRESSIONFlowStack             : at salesforce_to_twilio_connector(salesforce_to_twilio_connector/processors/2 @ ordertocashautomation-updu:mule-config.xml:38 (Transform)) 125 msPayload Type          : org.mule.runtime.core.internal.streaming.object.ManagedCursorIteratorProvider--------------------------------------------------------------------------------Root Exception stack trace:org.mule.runtime.api.el.ExpressionExecutionException: You called the function 'Value Selector' with these arguments:   1: String ("payload" as String {encoding: "UTF-8", mediaType: "*/*; charset=UTF-8", mime...)  2: Name ("Id")But it expects one of these combinations:  (Array, Name)  (Array, String)  (Date, Name)  (DateTime, Name)  (LocalDateTime, Name)  (LocalTime, Name)  (Object, Name)  (Object, String)  (Period, Name)  (Time, Name)5|   OppId: vars.OppDetails.Id,            ^^^^^^^^^^^^^^^^^^Trace:  at main (line: 5, column: 10)    at org.mule.weave.v2.el.WeaveExpressionLanguageSession.doEvaluate(WeaveExpressionLanguageSession.scala:130)    at org.mule.weave.v2.el.WeaveExpressionLanguageSession.evaluate(WeaveExpressionLanguageSession.scala:77)    at org.mule.weave.v2.el.WeaveExpressionLanguageSession.evaluate(WeaveExpressionLanguageSession.scala:103)    at org.mule.runtime.core.internal.el.dataweave.DataWeaveExpressionLanguageAdaptor$1.evaluate(DataWeaveExpressionLanguageAdaptor.java:252)    at org.mule.runtime.core.internal.el.DefaultExpressionManagerSession.evaluate(DefaultExpressionManagerSession.java:38)    at com.mulesoft.mule.runtime.core.internal.processor.SetPayloadTransformationTarget.process(SetPayloadTransformationTarget.java:29)    at com.mulesoft.mule.runtime.core.internal.processor.TransformMessageProcessor.lambda$0(TransformMessageProcessor.java:87)    at java.util.Optional.ifPresent(Optional.java:159)    at com.mulesoft.mule.runtime.core.internal.processor.TransformMessageProcessor.process(TransformMessageProcessor.java:87)    at org.mule.runtime.core.api.processor.Processor.lambda$apply$0(Processor.java:55)    at org.mule.runtime.core.api.util.func.CheckedFunction.apply(CheckedFunction.java:19)    at org.mule.runtime.core.api.rx.Exceptions.lambda$checkedFunction$2(Exceptions.java:84)    at org.mule.runtime.core.internal.util.rx.Operators.lambda$nullSafeMap$0(Operators.java:45)    at reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.onNext(FluxHandleFuseable.java:165)    at org.mule.runtime.core.privileged.processor.chain.AbstractMessageProcessorChain$1.onNext(AbstractMessageProcessorChain.java:292)    at org.mule.runtime.core.privileged.processor.chain.AbstractMessageProcessorChain$1.onNext(AbstractMessageProcessorChain.java:285)    at reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:127)    at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onNext(FluxPeekFuseable.java:204)    at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onNext(FluxOnAssembly.java:345)    at reactor.core.publisher.FluxSubscribeOnValue$ScheduledScalar.run(FluxSubscribeOnValue.java:178)    at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:50)    at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:27)    at java.util.concurrent.FutureTask.run(FutureTask.java:266)    at org.mule.service.scheduler.internal.AbstractRunnableFutureDecorator.doRun(AbstractRunnableFutureDecorator.java:111)    at org.mule.service.scheduler.internal.RunnableFutureDecorator.run(RunnableFutureDecorator.java:54)    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)    at java.lang.Thread.run(Thread.java:748)********************************************************************************



Kindly guide what can be done.
Need to generalize a code which requires a common field for reference(like Name) in all objects. Please suggest
Help in the form of Steps or code appreciated as new to Salesforce
help appriciated in case you can specify steps or code as i am new to Salesforce
Need to know complete trail (steps) to become a Salesforce developer
Need to know complete trail (steps) to become a Salesforce developer