error unknown Module attribute and no source code

Hello everyone, 

 

I have some DXL-defined attributes that give me error message when I try to create it in a new view. 

I want to check the code source of these DXL scripts but I cannot get the source code. The colleague who had created these scripts is no longer here. 

 

Here is the error message: 

-R-E- DXL: <Line:354> unknown Module attribute (a_Document_Type)
Backtrace:
    <Line:388> 
-I- DXL: execution halted
-R-E- DXL: <Line:354> unknown Module attribute (a_Document_Type)
Backtrace:
    <Line:388> 
-I- DXL: execution halted
-R-E- DXL: <Line:354> unknown Module attribute (a_Document_Type)
Backtrace:
    <Line:388> 
-I- DXL: execution halted
-R-E- DXL: <Line:354> unknown Module attribute (a_Document_Type)
Backtrace:
    <Line:388> 
-I- DXL: execution halted
-R-E- DXL: <Line:354> unknown Module attribute (a_Document_Type)
Backtrace:
    <Line:388> 
-I- DXL: execution halted
-R-E- DXL: <Line:354> unknown Module attribute (a_Document_Type)
Backtrace:
    <Line:388> 
-I- DXL: execution halted
-R-E- DXL: <Line:354> unknown Module attribute (a_Document_Type)
Backtrace:
    <Line:388> 
-I- DXL: execution halted
-R-E- DXL: <Line:354> unknown Module attribute (a_Document_Type)
Backtrace:
    <Line:388> 
-I- DXL: execution halted

 

Does someone know how to solve the issue or if it is possible to get the source code of DXL Attributes created by someone else?

 

Thank you ,

 

Best regards.

 

 

 


Socrate - Tue Jan 10 06:25:08 EST 2017

Re: error unknown Module attribute and no source code
Mathias Mamsch - Tue Jan 10 06:49:24 EST 2017

You should be able to read the source code, there is no restriction, as long as you have read access. Or are you talking about encrypted scripts? Regards, Mathias

Re: error unknown Module attribute and no source code
Socrate - Tue Jan 10 08:25:52 EST 2017

Mathias Mamsch - Tue Jan 10 06:49:24 EST 2017

You should be able to read the source code, there is no restriction, as long as you have read access. Or are you talking about encrypted scripts? Regards, Mathias

Hello Mathias,

 

Thank you for your answer. Yes I have found the source code now, but still I don't understand why the module attribute "a_Document_Type" is not recognized, while I have explicitely defined this  attribute in my module.

 

Here is part of the code:

 

for l in all(o <- S_LINK_MODULE) do 
        {
            ModuleVersion sourceVer = sourceVersion(l)
            Module sourceModule = module(source l)
            string moduleType = sourceModule."a_Document_Type"
            int indentValue = i_indentLevel * I_INDENT_VALUE
            int superIndentValue = i_indentLevel * I_INDENT_VALUE + I_INDENT_VALUE/2
            // only relevant if module exists with r access
            if (exists(module sourceVer))
            {
                Object oSource = source l

                if (oSource != null)
                {
                    displayInformation(moduleType, oSource, indentValue, superIndentValue, "<-") 
                    if (I_MAX_DEPTH == 0 || --iDepth > 0)
                    {
                        // call recursively
                        i_indentLevel++
                        fnRecursiveInlink(oSource, iDepth)
                        i_indentLevel--
                    }
                    
                }
            }

Re: error unknown Module attribute and no source code
Socrate - Tue Jan 10 09:02:07 EST 2017

Hello again,

 

I think have found the source of problem: the script checks all linked module and try to find the attribute "a_Document_Type"

but the attribute was not defined in all the linked modules. Therefore the script shows the error message. I created the same attribute in other linked modules and it seems better. 

 

Thank you for your assistence.

 

Regards,

Re: error unknown Module attribute and no source code
PekkaMakinen - Tue Jan 10 11:08:25 EST 2017

Socrate - Tue Jan 10 09:02:07 EST 2017

Hello again,

 

I think have found the source of problem: the script checks all linked module and try to find the attribute "a_Document_Type"

but the attribute was not defined in all the linked modules. Therefore the script shows the error message. I created the same attribute in other linked modules and it seems better. 

 

Thank you for your assistence.

 

Regards,

And this is why the probeAttribute type function is useful, see https://www.ibm.com/developerworks/community/forums/html/topic?id=7d0bb6a3-1ff7-4332-be1e-2ce2cf79d5e4&ps=25