9 Replies Latest reply on Jul 24, 2012 4:34 AM by Scott Dunbar

    PropertySync and importing and Exporting Properties

      I just discovered that the PropertySync feature is removed in 8.2 and that my stratagy for importing server and custom class properties isn't going to work.

      What is the recommended way to move properties from one blade logic instance to another?

        • 1. Re: PropertySync and importing and Exporting Properties
          Bill Robinson

          If you can’t export/import the properties w/ blpackages they you are going to have to script this somehow.  It should be possible to recursively enumerate all the custom property classes, then dump the property names and values in each as strings.  It’s not going to be pretty if you have properties that are not strings.

           

          If possible maybe you can rethink how you set the values.  is it possible to use a csv to set the values in both environments?  that would make things a bit easier.  Otherwise I’m not sure…

          • 2. Re: PropertySync and importing and Exporting Properties

            Can you outline the process for using a blpackage to import/export properties, please?

            • 3. Re: PropertySync and importing and Exporting Properties
              Bill Robinson

              I’m not sure if that works in 8.2.  if you export a package or job that uses properties and then import it, does it pull the property info along ?

              • 4. Re: PropertySync and importing and Exporting Properties

                No, they don't at least not for jobs.  I just tried doing it.

                 

                Going back to your other sugesstion, about scripting the process of creating properties:

                 

                What blcli commands would I use to create a property class?

                What blcli commands would I use to create a property in a class, both for built in and custom classes?

                I can see how I could use CSV files to set the properties themselves.  Does this work for non string values?

                In particular when the property type is a property class instance?

                 

                Thanks for your help.

                • 5. Re: PropertySync and importing and Exporting Properties

                  I have been attempting to use:

                  blcli_execute Property createProperty \

                       Class://SystemObject/Server/TEST_PROPERTY_STRING \

                       "Test Property String" "String" true false

                   

                  But I am stuck on what to use for the Type field.

                  The error message is asking for a fully quailified type name.  How do I find out what these names are.

                   

                  Perhaps I should use a different API.

                  • 6. Re: PropertySync and importing and Exporting Properties
                    Bill Robinson

                    You could use the PropertyClass addProperty command.  and look at the blcli docs for that command as it lists the property types.  i believe the addProperty command ends up calling the Property createProperty.

                    1 of 1 people found this helpful
                    • 7. Re: PropertySync and importing and Exporting Properties

                      I found a way to create the properties I need but not extract them using blcli.

                      For my needs this is sufficent.

                       

                      I used the following to create a property class:

                      blcli_execute PropertyClass createSubClass \

                           Class://SystemObject/ExistingPropertyClass \

                           NewPropertyClass \

                           "NewPropertyClass Description"

                       

                      Where ExistingPropertyClass can be empty to create a new root level custom property class.

                      Based on the name it was un-intuitive.

                       

                      Then to set properties I used a combination of:

                       

                      blcli_execute PropertyClass addProperty \

                                      "Class://SystemObject/PropertyClass" \

                                      "NewPropertyName"  \

                                      "NewProperty Description" \

                                      ${TYPE} \

                                      true \

                                      false \

                                      "DefaultValue"

                       

                      Where ${TYPE} is something like Primitive:/String etc for basic types or to create a link to another property class Class://SystemObject/PropertyClass.

                       

                      I also found that

                      PropertyClass addStringEnumProperty \

                                      "Class://SystemObject/${CLASS}" \

                                      "${NAME}"  \

                                      "${DESC}"  \

                                      true \

                                      false \

                                      true \

                                      "${NAMES}" \

                                      "${VALUES}" \

                                      "${DEFAULT}"

                       

                      Was usefull where names is "name1,name2,name3, etc" and values is "value1,value2,value3" and default is one of the values like "value1".

                      • 8. Re: PropertySync and importing and Exporting Properties
                        Bill Robinson

                        If you build the PD from a csv or similar, then you use that to build out the other env, and make sure to document any manual changes.

                        • 9. PropertySync and importing and Exporting Properties

                          I don't have an environment to test this myself.  Can you clarify for me that if a BLPackage has ??TARGET.property?? var and property does not exist in the target import environment, the property does NOT get created but what will happen to the parameterization above?  Does the preview of the import show that this property exists?