We are testing some signals and created new Usr object for this purpose since there were some issues on OOTB objects. After creating new object, signals for 'Record added' are not triggering.
Is there any additional configuration needed on object to enable signals?
Basically, in order to trigger the logic of starting business processes on the event of adding/modifying or deleting records, you need to select the object for which events will be tracked and specify the appropriate parameters. You can learn more in this article on Creatio Academy.
Also, you should additionally make sure that the new object has been published and the system has been compiled after adding a new custom object.
thanks for update, I already read all that and did not find any clues for additional setup. After your post, I tried to compile and publish all, but it did not help.
Is there any way I can check if signal was raised?
Can you provide more details on your custom code since I've created a simple method in the Account object that modifies a contact in the process inside the Account object (using onInserted method):
var contactEntity = UserConnection.EntitySchemaManager.GetInstanceByName("Contact");
var contactRecord = contactEntity.CreateEntity(UserConnection);
contactRecord.FetchFromDB("Id", new Guid("9c4111d2-cbf1-49f2-8c2b-00c6a82547c0"));
contactRecord.SetColumnValue("Name", "From the code");
contactRecord.Save();
and it triggers the business process with the start signal that is executed when the Contact name is modified. Maybe your logic is not modifying the record in the manner that should trigger the business process.
UsrContactSaved - the process on Contact schema that triggers when Contact record is saved ContactUtilities.ChangeContactStatus - the method that should change Status on schema Contact (this method is scheduled by job)
UsrOnContactStatusChanged - the process that should be triggered when the Status field in Contact schema was changed (but it doesn`t trigger)
So, when UsrContactSaved process triggered, there is a code in it that schedule a job that must call ContactUtilities.ChangeContactStatus in 10 minutes. After 10 minutes triggers ContactUtilities.ChangeContactStatus method and it changes Status via method in C# code.
In conclusion, status changed but UsrOnContactStatusChanged didn`t work. Expected result: UsrOnContactStatusChanged has to be triggered after work of UsrChangeContactStatusProcess process.
for an object(entity). And I have a business process that works on the signal OnRecordAdded for this object. My concern is, is the entity.Save() synchronous with the business process that runs for the entity? In other words, is the value for the "result" variable assigned only after this business process completes?
The result is accessible in the context of the business process execution and once the process completes its execution the result becomes unavailable.
You can also test it by debugging process execution in Visual Studio. You need to activate development in the file system and connect to the app via VS. Then you need to set breakpoints in the process schema and check when the result parameter receives the value and when it loses the value.
When using Throw signal, there is no way to specify the record Id the signal is associated with. What record Id is sent in the signal? How do you make sure that it is the record Id that you need to send?
For example, the process below does not provide a record Id with the signal.
A subprocess works, but I'm trying to limit the processes running on the server, so, I want to hand off the processing and not keep the parent process running.
If you need to use signals and reduce the number of processes running in your system you need to use event sub-process in your process and as a result complete several tasks in terms of one process. You can read more about event sub-process element here.
Whether or not a System User is Active can be read from System administration object. However, when the state of Active is changed in System Users, no Signal is caught using Record Modified if the Active flag was changed manually in System Users. The Signal only triggers a process if the Active status is changed by another process.
How can a process be started when changing the Active status of a System User manually?