Answers:
By chance, these processes are not deleted, which are skipped?
For this is possible when the number by [workflow.number] has already been assigned to the process and then the next one was used (and the processes were deleted / rolled back due to an error that was not within the scope of the number assignment).
19.10.2021, 18:30
Original comment available on version: ru
pointwise processes can be deleted, but not in such quantity, 1 out of ten is deleted, and here spaces are everywhere. Here are the newly created orders no one could delete at that time
19.10.2021, 23:16
Original comment available on version: ru
Good morning. We assign a value and do not overwrite it anymore. The only point where we can change the order number if this value is duplicated is the settings , that is, if the order number was generated twice with the same value, we change it.
Here are the morning ones
http://joxi.ru/12MRbejTw54XMA, no one has touched them yet, they were created by api and that's all, according to the order history, after which a gap of 10 values was assigned and did not change. The next order was also assigned a value and did not change
21.10.2021, 09:12
Original comment available on version: ru
I think the problem is that when a process is created, if there is an error in the response for the first action, then the number is still generated, but is not written anywhere. Because of this, there are gaps. Or even if it's not a starting one, then all the same, if you get an error during the transition, the number is generated, and not written down.
The same problem is observed in other functions
21.10.2021, 11:43
Original comment available on version: ru
Andrey, I agree that this may be so, but why are there gaps in 10 values? I don’t think that 10 api errors in a row are possible or when replacing a double, regenerate the number 10 times
If a double - they regenerated and a pass in one digit - which is ok. Also, when creating by api, there is an attempt to create - an error, a pass in one / two numbers, but not in 10
21.10.2021, 12:25
Original comment available on version: ru
Maybe something else, that's just when your order is loaded from some site or API.
Try to separate these actions, separately checking, and separately generating a number
21.10.2021, 12:49
Original comment available on version: ru
I don't understand what test you are talking about? If you are talking about checking for duplicates, so it is at a manual stage, that is, at the start, only the number is generated, and then when the order is taken into work (the employee clicks with his hands), there is a check for duplicates and an update if a duplicate is found
In addition, such settings (number generation and checking for duplicates) were made a long time ago, and the problem with spaces in the numbering appeared only now
Regarding sending api requests and what's with the answers from the admin, I'm waiting
21.10.2021, 13:18
Original comment available on version: ru
there is a difference of 100+ processes between these orders
If you look, the previous ones go in order, that is, this is not a pattern.
And now just filter out remote orders and see how many of them are between these code values.
21.10.2021, 16:13
Original comment available on version: ru
Here's another thought to think about. Do you have the order creation pre-page disabled? If yes, then even when you accidentally opened the page for creating an order, it has already been created, but until you save it, it will be deleted.
21.10.2021, 16:14
Original comment available on version: ru
among the remote there is none between these process id
and when creating a process and blocking the creation (for example, an api error), the process itself is not created, but do the actions of the starter have time to work out?
21.10.2021, 16:26
Original comment available on version: ru
it can simply reserve a number for it, as often happens with importing orders from other services if an error occurs during creation. I think it's the same here.
21.10.2021, 16:38
Original comment available on version: ru
if there is an error in the REST API, the results of the actions will be rolled back (except for physical manipulations with the file system)
although there may be exceptions due to action conflicts
Actually there are several options:
1. re-forming numbers
2. change of BP with a further change of number
3. remote processes
etc.
In this case, I would like to understand after performing what actions the number is already used in the system, but there is no process with it (where the process is created).
21.10.2021, 16:42
Original comment available on version: ru
Maxim, the above processes were created at night / in the morning only by API, they did not have time to do anything with them. The settings are done like this. Using the order add method, we create a process at the stage
https://crm.ohrana.ua/admin/shop/workflowstatus/367/action/new/ is being filled, here the number is assigned by the action . Then there are two options for events, either the order is filled in by the client on the site and an update of the process arrives in the box with the stage changed to Order from the site (the order number does not change, there are no actions associated with this field at the stage), or after 5 minutes the process stage in the Box switches to the stage Order from the site (the same stage, that is, there is no action with the additional field Order number).
That is, when creating a value using api already with spaces, there is an assumption that when you try to create using api and receive an error (not receiving a response), the actions of the start work out and because of this, spaces
21.10.2021, 17:00
Original comment available on version: ru
Good morning. All the same, when sending a request to create an order and receiving an error, a number is generated, checked like this:
Orders were created through the site, that is, they came to the box via api. After creating the first order 21-107352 from the site, I send a request to create an order
https://crm.ohrana.ua/api/orders/add/?login=LOG&password=PAR&clientphone...Given that such an external id is already in boxing, I get the error
http://joxi.ru/eAOObe1f6B0yKA. I create a second order from the site - an order with the number 21-107354 arrives in the box, that is, one number is missing.
Again I send the above request to create an order with the same external id three times in a row, then again I create an order from the site and 21-107357 is created in Box, that is, three passes
Please fix this
26.10.2021, 09:57
Original comment available on version: ru
This error is thrown even before an attempt to create a process, in fact, there is no launch of actions ...
Even if there was an error during process creation - all this happens within a transaction, the data would be rolled back...
Please give a link to the contact, under whose REST API access you are sending a request - I will personally check and try to figure out where the problem is.
26.10.2021, 17:03
Original comment available on version: ru
Original number 108750
I make 10 requests (mentioned above), for each I get an error {"result":"fail","errors":["Order is already!"],"errorText":false}
Number remains 108750
Let's do it differently - I added logging in the specified action in the place of rewriting the number - indicate from the current moment which number will be skipped - I will check for which process and where it was recorded.
At the time of adding the logs, the number was 108757 for BP=16
27.10.2021, 17:16
Original comment available on version: ru
Redesigned the logic of the action - now the fields are checked for fullness before changing the variables in the formula.
Check if your problem is solved?
01.11.2021, 14:46
Original comment available on version: ru
Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter.
Log in and comment