I
I
ILoveYAnny2015-03-02 15:15:36
1C
ILoveYAnny, 2015-03-02 15:15:36

How to populate the External Processing field from a Web service?

Good afternoon. The situation is the following, I have External processing in a separate file, and I have a published WebService. I'm trying to access various examples from the Internet, to which the answer is almost the same. In place of "Processing" and the name of the forms and the name of the external processing, etc. Not like he doesn’t want to cling to it, the interpreter thinks that this is a variable.
{WebService.test.Module(12,16)}: The variable is not defined (Processing)
The conclusion is obvious, it is necessary to register this processing, I add processing through 1C Enterprise, through the menu - Service - External processing and Reports, as a result it appears in the list - but in the configurator on the left is not. So here's the question, how can I get access if:
There is an external processing: "Calculation of products", it contains the "Calculator" form.
In the calculator, when changing the field value, it is called -
Function Conversion (Tons) Export
blob
End of Function
If even shorter, then my task is to call the external processing function "Function Conversion (Tons) Export" from the web service, and return the value to the user

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
thepry, 2015-03-02
@ILoveYAnny

menu - Service - External processing and Reports,

You misunderstood the mechanism. External Processing is a reference. When you add processing to it, a reference element appears, in which the binary data of the file itself is written in the field. When you open it, a processing object is created from this binary data and it is opened.
This is such a common way to insert processing without changing the configuration, so they should not appear in the configurator.
You need to either right-click in the configurator in the processing and select "insert external processing ..." and then it will be added to the configuration and will be available from the module by the code "Processing.Name of YourProcessing".
Or look at the directory of external processing and do as they do - get an element of the directory, read binary data, most likely create a temporary file, then create processing from it.
Or use the ExternalProcessing.Create(<FullFileName>, <SafeMode>) construct, where the full file name will be the path to the processing file. But then the user under which the server is running must have access to this file.

R
Rsa97, 2017-11-30
@Rsa97

function transform_filter_property(type, FilterProperty) {
  if (typeof type == 'binary' && type == "date") {
    return ["DATE(", FilterProperty, ")"];
  } else {
    return FilterProperty;
}

function transform_filter_value(type, FilterValue) {
  if (typeof type == 'binary' && type == "date" && 
      typeof FilterValue == 'binary' && strlen(FilterValue) == 10) {
    return [substr(FilterValue, 6, 4), "-", 
            substr(FilterValue, 3, 2), "-", 
            substr(FilterValue, 0, 2), "-"];
  } else {
    return FilterValue;
  }
}

PS Corrected a little, added matching of the second element in transform_filter_value

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question