def serialize_task_spec(self, spec, elem):
if spec.id is not None:<EOL><INDENT>SubElement(elem, '<STR_LIT:id>').text = str(spec.id)<EOL><DEDENT>SubElement(elem, '<STR_LIT:name>').text = spec.name<EOL>if spec.description:<EOL><INDENT>SubElement(elem, '<STR_LIT:description>').text = spec.description<EOL><DEDENT>if spec.manual:<EOL><INDENT>SubElement(elem, '<STR_LIT>')<EOL><DEDENT>if spec.internal:<EOL><INDENT>SubElement(elem, '<STR_LIT>')<EOL><DEDENT>SubElement(elem, '<STR_LIT>').text = str(spec.lookahead)<EOL>inputs = [t.name for t in spec.inputs]<EOL>outputs = [t.name for t in spec.outputs]<EOL>self.serialize_value_list(SubElement(elem, '<STR_LIT>'), inputs)<EOL>self.serialize_value_list(SubElement(elem, '<STR_LIT>'), outputs)<EOL>self.serialize_value_map(SubElement(elem, '<STR_LIT:data>'), spec.data)<EOL>self.serialize_value_map(SubElement(elem, '<STR_LIT>'), spec.defines)<EOL>self.serialize_value_list(SubElement(elem, '<STR_LIT>'),<EOL>spec.pre_assign)<EOL>self.serialize_value_list(SubElement(elem, '<STR_LIT>'),<EOL>spec.post_assign)<EOL>return elem<EOL>
Serializes common attributes of :meth:`SpiffWorkflow.specs.TaskSpec`.