Provisioning order of packages and their dependencies

#1

I am provisioning a package called myPackage.
It depends on another package called anotherPackage.
They both contain a type called myType.c3typ that is a remix of a type in another package called basePackage.
I am expecting that the package I am provisioning (myPackage) should be the latest provisioned package, therefore if it remixes the same type that is remixed in one of the dependencies, I should see the version from myPackage.
But my problem is that the version of the type that is provisioned to the server is the one from package anotherPackage…
My only guess is that it could be related to the timestamps of the files, but it doesn’t make sense to me that the provisioner would favor a file in a dependent package over the provisioned package because it is newer…

Thanks for your help

0 Likes

#2

There is no such thing as “provisioning order”, instead all 3 definitions are combined into one definition at provisioning time. If you can provide the 3 myType.c3typ definitions, and also provide what you are seeing in the provisioned tag, i will be happy to explain what you are seeing and/or diagnose a bug.

0 Likes

#3

OK, let me me be more precise:
I am provisioning a package called jm that contains the following file:
remix type TransformMeasurementSeriesToPointMeasurementSeries {
id: ~ expression "exists(tag) ? concat(‘PMS_’, tag) : null"
tag: ~ expression ‘tag’
}

This package depends on processManufacturing that contains the same file, but different content:
remix type TransformMeasurementSeriesToPointMeasurementSeries {
id: ~ expression "exists(equipmentId) ? concat(‘EQP_’, equipmentId) : null"
equipment: ~ expression ‘{“id”: “equipmentId”}’
}

What I was seeing in the tag after provisioning was the latter mapping rule for field id was executed, giving me a bunch of errors because equipmentId is not unique in my source file.

What I mean by “provisioning order” is that if I am remixing the same type several times, redefining the same field, I expect the top-level package’s definition to be in my tag.

Does it make sense?

I solved my issue by copying what I needed from the file in processManufacturing (the equipment field) into the file in my jm package, and I removed the file from the processManufacturing package.

Thanks!

0 Likes