Eduard Lebedyuk · Jul 7, 2020 go to post

As Ens.StreamContainer has a OriginalFilename property you can use that in your custom BO by specifying a subfolder ob request (so OriginalFilename  = /subfolderA/name.txt).

I would try to avoid the mixing of:

  • technical issue - outputting file into one of the several subfolders based on a filename
  • business issue - determining which subfolder to output file to based on extracurricular conditions

Operation/adapter should solve only one type of issues, either technical or business.

Eduard Lebedyuk · Jul 7, 2020 go to post

Compiler does build dependency tree. If you encounter some kind of the issue where your classes are not compiled in a correct order you might open a WRC ticket.

Use DependsOn keyword to provide hints to compiler.

Eduard Lebedyuk · Jul 6, 2020 go to post

It might sufficient to put your code just into a CODE Block of a BP generated with the wizard.

If you need to execute raw ObjectScript from BPL add assign activity and set status variable to the value of your classmethod. No need to add a code block.

Still, BP without BPL are quite easy to implement, here's the guide.

Eduard Lebedyuk · Jul 2, 2020 go to post

What's your file I/O default?

zn "%SYS"
do ^NLS
Choose 4) Display loaded settings
Choose 3) Display system defaults for I/O tables

Here's what I got:

-------------- System defaults for I/O tables --------------
 
Table               Name
-----------------   ---------------
Process             RAW
Cache Terminal      UTF8
Other terminal      UTF8
File                UTF8
Magtape             UTF8
TCP/IP              RAW
System call         RAW
Printer             CP1251
Eduard Lebedyuk · Jul 2, 2020 go to post
  1. Shut down InterSystems IRIS on Machine 1.
  2. Copy IRIS.DAT from Machine 1 to Machine 2
  3. Mount IRIS.DAT to InterSystems IRIS on Machine 2.
Eduard Lebedyuk · Jul 2, 2020 go to post

Great news about ARM support.

As tagged image can be provided with several architectures (example with 4) is there a reason why we separate the tags into community and community-arm?

Eduard Lebedyuk · Jun 29, 2020 go to post

Get property parameter by global access:

/// Get property param
/// w ##class().GetPropertyParam("Form.Test.Simple", "Name", "MAXLEN")
ClassMethod GetPropertyParam(class As %Dictionary.CacheClassname = "", property As %String = "", param As %String = "") As %String [ CodeMode = expression ]
{
$$$comMemberArrayGet(class, $$$cCLASSproperty, property, $$$cPROPparameter, param)
}
Eduard Lebedyuk · Jun 29, 2020 go to post

You can send the request directly from a service to operation.

Your BP must implement the following methods to work:

  • OnRequest
  • OnResponse

As both methods are missing from your BP it does not work.

Eduard Lebedyuk · Jun 28, 2020 go to post

If it's a File Stream you can set TranslateTable property to your charset before reading.

Otherwise you can use $zcvt function to convert strings.

Here's an example of iterating encodings for $zcvt to determine a correct encoding.

If you are interested in encoding internals use zzdump to check hexdumps.

If your encoding is region specific don't forget to set your locale.

Eduard Lebedyuk · Jun 28, 2020 go to post

Persistent classes:

SELECT Name
FROM %Dictionary.ClassDefinition_SubclassOf('%Persistent')

List properties and relationships (if you need subset - filter by parent - it's a class):

SELECT
parent,  Name, Cardinality, Collection, Id, _Identity,  Relationship, Type
FROM %Dictionary.CompiledProperty

Foreign keys:

SELECT
parent, Name, Properties, ReferencedClass, ReferencedKey
FROM %Dictionary.ForeignKeyDefinition

For everything %Dictionary.Compiled* - includes defined and inherited values, Definitions include only items defined in a current class.

Eduard Lebedyuk · Jun 26, 2020 go to post

You need to remove these lines from Login method.

  1. Copy paste Login method into your broker from %CSP.REST.
  2. Remove the line.
  3. Compile.
Eduard Lebedyuk · Jun 26, 2020 go to post

Redefine Login method in you broker and remove:

#; We want Basic authentication
Do %response.SetHeader("WWW-Authenticate","Basic")
Eduard Lebedyuk · Jun 26, 2020 go to post

Curenlty active setting value (so System Default Setting in your case) should be returned.

I was unable to reproduce the issue on Cache for Windows (x86-64) 2016.1.4 (Build 104_6U) Wed May 22 2019 12:23:59 EDT.

Have you updated your production?

Check that your production definition does not contain old settings.

Eduard Lebedyuk · Jun 22, 2020 go to post

Add a new Business Host. If you want to add several, call CallProductionUpdateAndSaveToClass method once at the end.

Include Ensemble

Class test.prod
{

Parameter DOMAIN = "Ensemble";

/// Add new Business Host.
/// productionName - name of production class
/// name - name of item you want to add
/// class - class name of the item you want to add
/// w $System.Status.GetErrorText(##class(test.prod).add())
ClassMethod add(productionName As %Dictionary.CacheClassname = "isc.py.test.Production", name As %String = "MyOperation", class As %Dictionary.CacheClassname = "isc.py.ens.Operation")
{
    Set production = ##class(Ens.Config.Production).%OpenId(productionName)
    
    Set item = ##class(Ens.Config.Item).%New()
    Set item.PoolSize = 1
    Set item.Name = name
    Set item.ClassName = class
    Set:item.Name="" item.Name = item.ClassName
    Set item.Enabled = $$$YES
    Set sc = production.Items.Insert(item)
    Quit:$$$ISERR(sc) sc
    Set sc = $$$AuditModifyProductionConfig(production.Name,item.Name,$$$Text("Item added to production using generator in " _ $classname()))
    Quit:$$$ISERR(sc) sc   
    Set sc = ##class(EnsPortal.Template.prodConfigSCPage).CallProductionUpdateAndSaveToClass(production,"","SaveProduction")
    Quit sc
}

}
Eduard Lebedyuk · Jun 22, 2020 go to post

Can you expose your service as a REST?

Client-side JS is really not suited to working with web services.


@Yuri Marx solution (HandleCorsRequest) would work for REST.

Eduard Lebedyuk · Jun 20, 2020 go to post

Here are some ideas for contestants:

  1. MLOperation. Currently, PythonGateway provides low-level PythonOperation aimed at expert users who write Python code themselves. The idea of MLOperation is to build a high-level Interoperability adapter targeted at a broader userbase. Essentially your adapter provides generalized Fit/Predict/Optimize methods and users need to provide the data, target model type, and hyper parameter values. This closes the gap between the hands-off approach of the IntegratedML and low-level approach of the PythonGateway. The work is described in this issue.
  2. New ML language. Interoperability with numerical computational languages or even CASes proper are great and offer the freedom of choice. Furthermore, these math-oriented languages allow faster problem search/space traversal than more generalized languages such as Python. Several classes of supporting ML problems can be solved with them. Callout interface makes implementation process easy (reference implementations: PythonGateway, RGateway, JuliaGateway). Suggested languages: Octave, Scilab
  3. New showcases in IoT, Real-Time predictions, RPA. Convergent Analytics group provides a lot of starting templates in these fields - as InterSystems IRIS capabilities are an especially good fit for them. I'm always interested in more examples, especially real-life examples of machine learning.
  4. Data Deduplication solutions. Do you have a dataset with a lot of dirty data and know how to clean it? Great. Make a showcase out of it.
  5. Reinforcement learning showcases. Examples of Partially observable Markov decision process or other reinforcement learning technologies.

 

Also, note that PythonGateway-Template is built upon the Advanced Analytics image, so you can use both IntegratedML and PythonGateway from the same docker image.

Eduard Lebedyuk · Jun 19, 2020 go to post

Very interesting.

One of our customers is running BPMN processes in Ensemble.

Would like to read about your approach.