interoperability_production_create
Create an Interoperability Production in InterSystems IRIS to establish data exchange workflows between systems.
Instructions
Create an Interoperability Production
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Implementation Reference
- Implements the core logic for creating an Interoperability Production using IRIS APIs, including validation, creation, saving, and compilation.async def interoperability_production_create(name: str, ctx: Context) -> bool: if "." not in name: raise ValueError( "Production name must in format packagenamespace.productionname, where packagenamespace can have multiple parts separated by dots" ) iris = ctx.iris with transaction(iris): prod = iris.classMethodObject( "%Dictionary.ClassDefinition", "%OpenId", name ) if prod: raise ValueError(f"Class {name} already exists") logger.info(f"Creating Interoperability Production: {name}") prod = iris.classMethodObject("Ens.Config.Production", "%New", name) raise_on_error(iris, prod.invokeString("SaveToClass")) raise_on_error(iris, prod.invokeString("%Save")) raise_on_error( iris, iris.classMethodString("%SYSTEM.OBJ", "Compile", name, "ck-d") ) return True