7 Replies Latest reply on Oct 11, 2018 5:42 AM by Dan_Mills

    Service Request Extended Task in Workflow

    Dan_Mills Apprentice

      Hi

       

      I'm trying to pull information from the Service Request Parameters to put into an extended task to be worked on.

       

      The parameters I'm using are "Start Date", "First Name", "Last Name", then the Name of the task.

       

      The formula I have used is:

       

      $(GetSRPValue(RecId,  "EmployeeStarterRequestStartDate") +  GetSRPValue(RecId,  "EmployeeStarterRequestFirstName") + " " +  GetSRPValue(RecId,  "EmployeeStarterRequestLastName") + " Send Welcome Pack")

       

      However this is failing:

       

       

      Not sure how best to correct the formula?

       

      Thanks
      Dan

        • 1. Re: Service Request Extended Task in Workflow
          AnthonyDowns Specialist

          Your expression looks good. Can you look at the workflow instance to see if an error stands out? Such as missing a required field.

           

          With the instance window click the exception the left for details.

          • 2. Re: Service Request Extended Task in Workflow
            AnthonyDowns Specialist

            Working example.

            Request Offering

            Extended Task

            $(GetSRPValue(RecId,  "txtTestOne") + " " +  GetSRPValue(RecId,  "txtTestTwo") + " " +  GetSRPValue(RecId,  "txtTestThree"))

            SR created

             

            Task attached to SR

            • 3. Re: Service Request Extended Task in Workflow
              Dan_Mills Apprentice

              Hi Anthony

               

              Error is below:

               

              Creation of task failed for wf instance Id:D9EE898710D247E4B80A2D5DC7744C92, Blk Name:advancedtask, Blk Title:Welcome Pack, Blk Id:7FEDF8833E19453891A574380E956CF5.

              Exception Details:

              Message: Unhandled system exception: System.Web.Services.Protocols.SoapException: WorkflowService.ExecuteQuickActionById failed for tenant dev-heat and quick action 'Workflow insert object': Error when evaluating expression; DataValue.PromoteToCommonType: datetime: can't convert from string..

              . POST:http://uk2-app-ftr-d01/HEAT/ServiceAPI/WorkflowService.asmx,

              Stacktrace:

               

              Server stack trace:

              at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)

              at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

              at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

              at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

               

              Exception rethrown at [0]:

              at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

              at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

              at com.frontrange.saas.ws.meta.WorkflowServiceSoap.ExecuteQuickActionById(ExecuteQuickActionByIdRequest request)

              at com.frontrange.saas.ws.meta.WorkflowServiceSoapClient.ExecuteQuickActionById(String sessionKey, String tenantId, String QuickActionId, String ContextBusObId)

              at com.frontrange.Services.WorkflowServiceClientImpl.<>c__DisplayClass5_0.b__0(String s)
              at com.frontrange.Services.ClientServiceBase.ExecuteWithRetryOnInvalidSession[T](Func`2 function, String sessionKey, String tenantId)
              at FrontRange.Workflow.Block.AdvancedTask.AdvancedTask.InvokeBlock(BlockExecutionInput input, BlockExecutionOutput& output)

              • 4. Re: Service Request Extended Task in Workflow
                Dan_Mills Apprentice

                Also will it make any difference that I tried to get the formula to work in the Subject rather than the details?


                Dan

                • 5. Re: Service Request Extended Task in Workflow
                  Dan_Mills Apprentice

                  Hi Anthony

                   

                  I've figured it out!

                   

                  It's to do with the date: (GetSRPValue(RecId,  "EmployeeStarterRequestStartDate")

                   

                  I've taken that out of the formula and got the workflow working.

                   

                  So from what I can understand it can't convert the date field.

                   

                  Any further thoughts?

                   

                  Dan

                  • 6. Re: Service Request Extended Task in Workflow
                    Dan_Mills Apprentice

                    Does the error Error when evaluating expression; ADD-operator is not supported for DateTime..

                     

                    Mean anything to you?

                     

                    Dan

                    • 7. Re: Service Request Extended Task in Workflow
                      Dan_Mills Apprentice

                      I have it working!

                       

                      Had to use the function of ToString to convert it to text:

                       

                      $(ToString(GetSRPValue(RecId,  "Startdatetime")) + " " +  GetSRPValue(RecId,  "EmployeeStarterRequestFirstName") + " " +  GetSRPValue(RecId,  "EmployeeStarterRequestLastName"))

                       

                       

                      Thanks for pointing me in the right direction

                       

                      Dan