I am using the same code to trigger 13 workflow form item attachment event receiver ,but i am getting null in (SPWorkflowAssociation associationTemplate) in case of 13 workflow template ,while successfully able to trigger 10 workflow template.
Can u please guide this isssue?.
Related
I have a pipeline where the following activities takes place
Lookup-> Lookup ->ForEach->(Stored Procedure)-> Send Success Email/ Send Failure Email
Once the pipeline successfully completed its execution, I see a successful email in my inbox, however for any reason the foreach activity fails I don't see a Failure Email.
Inside Foreach Stored procedure might get executed dynamically sometimes based on N number of times.
Inside foreach I have only one activity (Stored Procedure execution).
This is the configuration for Email Failure message, I do try to pull the dynamic error message, so I have added a code as "ErrorMessage":"#{activity('Lookup').output.message}", It shows me
Error.Message is not a property, Moreover I wanted to get a Failure email
Configuration for Success Email, works perfectly fine
I have achieved the above task by modifying my pipeline with
Lookup->Lookup->ForEach(Stored Procedure -> If Condition-> WaitTrue/WaitFalse -> WebJob to send email which I have added to a separate pipeline)
Under if condition activity checking for Error status from previous activity
#contains(activity('Load Tables').Status,'Succeeded')
In case of Failure, the status would be Error and catching the message as
"errorMessage":"#{activity('Load Tables').Error.message}"
I am following this tutorial to send a message from service bus topic to email using Event Grid.
When I run the Logic App, I get the following error:
Failed to start a run of logic app test-servicebusq. The template language expression evaluation failed: 'The execution of template trigger 'When_a_resource_event_occurs' failed: the result of the evaluation of 'splitOn' expression '#triggerBody()' is of type 'Null'. The result must be a valid array.'
When I send a message to the service bus, the logic app does not get triggered at all.
I have turned of the 'splitOn' and when I run the logic app manually, the trigger gets fired and the logic app is executed, but when I send a message to the service bus topic, the trigger does not get triggered automatically (unless I manually Run the logic app).
I want the logic app to be automatically triggered when a new message arrives in the service bus.
Is there something I am doing wrong? I followed the tutorial step by step and I am still unable to figure out what is the problem. Do I need to create an event grid resource somewhere? (it is not mentioned in the tutorial)
Edit: I am using the following code to send the message
from azure.servicebus import ServiceBusClient, ServiceBusMessage
connstr = <connection string>
topic_name = "fileincomplete"
with ServiceBusClient.from_connection_string(connstr) as client:
with client.get_topic_sender(topic_name) as sender:
sender.send_messages(ServiceBusMessage("Data12"))
After reproducing in my local environment, I could able to make this work after mentioning the Event Type Item. Below is my logic app flow.
I am using the below code to send the messages
from azure.servicebus import ServiceBusClient, ServiceBusMessage
CONNECTION_STR = "<YOUR_NAMESPACE_CONNECTION_STRING>"
TOPIC_NAME = "<YOUR_TOPIC_NAME>"
servicebus_client = ServiceBusClient.from_connection_string(conn_str=CONNECTION_STR, logging_enable=True)
with servicebus_client:
sender = servicebus_client.get_topic_sender(topic_name=TOPIC_NAME)
with sender:
message = ServiceBusMessage("Data12")
sender.send_messages(message)
print("Sent a single message")
RESULTS:
I'm using Azure Logic App. This is the architecture:
I have a Scope Insert Row that include an insert statement in database.
I would like to send via mail the message of the exception of the insertion.
For example if the Insert statement failed with Foreign key exception, i would like to send this message.
How can I refer to this error message inside the 'Send error Msg' feature?
Thanks a lot guys :)
You could set the Configure run after value to implement it. Set the Send an email action run after Insert row has failed.
If the Insert action success, the send mail won't execute and if it fails the send mail would work. You could also add the run after action value like the time out or is skipped, they are all kind of exceptions.
UPDATE: If this is your error message, you could add it with #{body('Insert_row')?['message']} in code view mode.
And here is my error message and the subject setting.
You can make use of Filter Array and result function to capture the actual error of an action failed in a Scope.
For more insights with example see following article - How can I handle exception in Azure Logic App
Thanks,
Maheshkumar Tiwari
TechFindings...by Maheshkumar Tiwari
Can anyone tell me what the Task Category ID is for a Web Event used in the Event Viewer?
_eventLog.WriteEntry(eventText, EventLogEntryType.Warning, 1001, [value for web event]);
I have a SPD 2010 workflow that uses the start approval process task. This activity allows user to approve or deny a request from the task item. If the user rejects the item, then the workflow status gets set to "Rejected".
My question is how do i get the current workflow status value?
i.e. if the user rejects it, then i want the workflow to branch. But how do i branch based on workflow status?
I tried Current Item: Approval Status. But that does not seem to be correct.
thanks
The workflow status are constants (integers), so you'll need to refer to a list like:
Status: Value
Not Started: 0
Failed on Start: 1
In Progress: 2
Error Occurred: 3
Canceled: 4
Completed: 5
Failed on Start(Retrying): 6
Error Occurred (Retrying): 7
Canceled: 15
Approved: 16
Rejected: 17
So you'd need to check if Approval Status equals 17.